Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.util.Random;
  2. import java.util.Scanner;
  3.  
  4. /**
  5. * AtividadeMegaSena
  6. */
  7.  
  8. public class AtividadeMegaSena {
  9.  
  10. public static void main(String[] args) {
  11.  
  12. Scanner teclado = new Scanner(System.in);
  13. System.out.println("Quantos jogos você quer fazer?");
  14.  
  15. int jogos = teclado.nextInt();
  16.  
  17. Random aleatorio = new Random();
  18.  
  19. int[] numeros = new int[6];
  20.  
  21. for (int i = 1; i <= numeros.length; i++) {
  22. System.out.println(aleatorio.nextInt(61));
  23.  
  24. }
  25.  
  26. teclado.close();
  27.  
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement