a card on which the letter J is written on one side and K on the other. You want to see all of the possible ways the card will land if you drop it n times
import java.util.Random;
public class Main {
public static void main(String[] args) {
final Random random = new Random();
int n = 10;
while(n-- > 0){
if(random.nextBoolean()){
System.out.print("K ");
}
else{
System.out.print("J ");
}
}
}
}
Comments
Leave a comment