Advertisement
lol1234561

Untitled

Sep 28th, 2023
545
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. import java.util.Arrays;
  2. import java.util.Random;
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Random rand =  new Random();
  6.        
  7.         int[] num = new int[10];
  8.  
  9.         for( int x = 0; x < num.length; x++){
  10.             num[x]  = rand.nextInt(100)+1;
  11.             System.out.println("Slot "+ x + " contains  " + num[x]);
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement