Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public static void Cwiczenie_04()
  2. {
  3. int[] tab1;
  4. tab1 = new int[(int)(Math.random() * 100)];
  5. for(int x1 = 0; x1 < tab1.length; x1++)
  6. {
  7. tab1[x1] = (int) (Math.random() * 10);
  8. System.out.print(tab1[x1] + " ");
  9. }
  10.  
  11. int[] tab2;
  12. tab1 = new int[(int)(Math.random() * 100)];
  13. for(int x2 = 0; x2 < tab2.length; x2++)
  14. {
  15. tab2[x2] = (int) (Math.random() * 10);
  16. System.out.print(tab2[x2] + " ");
  17. }
  18.  
  19. int[] tab3;
  20. tab1 = new int[(int)(Math.random() * 100)];
  21. for(int x3 = 0; x3 < tab3.length; x3++)
  22. {
  23. tab1[x3] = (int) (Math.random() * 10);
  24. System.out.print(tab1[x3] + " ");
  25. }
  26.  
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement