Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Stammashu
- {
- /**
- * @param args
- */
- public static void main(String[] args)
- {
- Random dice = new Random();
- int Random;
- int age;
- int age2;
- Random = 1+dice.nextInt(9999);
- for(int counter=1; counter<=1;counter++){
- age = dice.nextInt(1);
- Scanner reader = new Scanner(System.in);
- System.out.println("Write the number: " + Random);
- age2 = reader.nextInt();
- if (Random == age2)
- {
- System.out.println("Correct!");
- }
- else
- {
- System.out.println("Wrong");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement