Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import java.util.Random;
  2. public class NumerosRandom {
  3.  
  4. public static void main(String[] args) {
  5.  
  6. Random random = new Random(1000);
  7.  
  8. for (int i = 0; i < 50; i++) {
  9.  
  10. System.out.printf("%3d ", random.nextInt(101)); // displays 1-99
  11. if ((i + 1) % 10 == 0) {
  12. System.out.println();
  13. }
  14. }
  15.  
  16.  
  17. }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement