Created
April 9, 2020 21:48
-
-
Save bkyrlach/2110c2a6eced1f58ba6375bee3e13543 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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