Advertisement
invina_

Untitled

Oct 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package create_array_100;
  2.  
  3. import java.util.Random;
  4.  
  5. public class array {
  6.  
  7. final static Random random = new Random();
  8.  
  9. public static void main(String[] args){
  10. int a[] = new int [100];
  11. String str ="";
  12. System.out.println ("наш массив очень красив ");
  13. for (int i=0; i<100; i++)
  14. {
  15. a[i] = random.nextInt(50);
  16. str+= a[i] + " ";
  17.  
  18. }
  19. System.out.println (str);
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement