Skip to content

Instantly share code, notes, and snippets.

@bkyrlach
Created April 9, 2020 21:48
Show Gist options
  • Save bkyrlach/2110c2a6eced1f58ba6375bee3e13543 to your computer and use it in GitHub Desktop.
Save bkyrlach/2110c2a6eced1f58ba6375bee3e13543 to your computer and use it in GitHub Desktop.
package com.kyrlach.coinflip;
import java.util.Random;
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
Random r = new Random();
System.out.println("Hello.");
int whatever = s.nextInt();
// System.out.println(whatever);
if(whatever < 3) {
System.out.println("I am true!");
} else {
System.out.println("I am false!");
}
int count = 0;
while(count < whatever) {
count++;
System.out.println(r.nextInt(10) + 1);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment