Created
December 1, 2015 18:30
-
-
Save jukbot/39e90f9f4bcc67af74ec 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
import java.util.Random; | |
import java.util.Scanner; | |
public class Random { | |
public static void main(String[] args) { | |
Random rand = newRandom(); | |
int a = rand.nextInt(9); | |
int b = rand.nextInt(9); | |
System.out.println ("What is the answer of" a "+" b); | |
Scanner sc = new Scanner(System.in); | |
c = sc.nextInt(); | |
if (a+b = c) | |
return true; | |
else | |
return false; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment