Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- public class Main {
- public static void main(String[] args) {
- int toss;
- Random randomNumber = new Random();
- for (int i = 0; i <= 10; i++)
- {
- toss = randomNumber.nextInt(2);
- if (toss == 1)
- {
- System.out.println("Heads");
- }
- else
- {
- System.out.println("Tails");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment