Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- public class NumerosRandom {
- public static void main(String[] args) {
- Random random = new Random(1000);
- for (int i = 0; i < 50; i++) {
- System.out.printf("%3d ", random.nextInt(101)); // displays 1-99
- if ((i + 1) % 10 == 0) {
- System.out.println();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement