Advertisement
lol1234561

Untitled

Apr 20th, 2023
562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import java.util.Random;
  2. public class Main {
  3.     public static void main(String[] args) {
  4.         Random rand = new Random();
  5.         int[] number = new int[10];
  6.  
  7.  
  8.         for (int x = 0; x <= 9; x++){
  9.             number[x] = rand.nextInt((100)+1);
  10.             System.out.println("slot " + x + " contains a " + number[x]);
  11.         }
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement