Guest User

Untitled

a guest
Oct 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public static void main(String[] args) {
  2. Scanner scanner = new Scanner(System.in);
  3. long a = 252149039;
  4. int c = 11;
  5. long m =(long) Math.pow(2, 48);
  6. long seed = System.currentTimeMillis();
  7. System.out.println("How many Random numbers would you like to get?");
  8. int number = scanner.nextInt();
  9. for (int i = 0; i <= number;i++) {
  10. seed = ((a*seed)+c) % m;
  11. System.out.println(seed);
  12. }
  13. scanner.close();
  14. }
Add Comment
Please, Sign In to add comment