Created
August 21, 2015 01:14
-
-
Save carbonrobot/2328bf8dc702af77f0ef to your computer and use it in GitHub Desktop.
Randomness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public class Main { | |
public static void main(String[] args) { | |
int range = 100; | |
for(int i = 1; i <= 20; i++){ | |
int number = (int)(range * Math.random()) + 1; | |
System.out.format("%-10s", number); | |
if(i % 5 == 0){ | |
System.out.println(""); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment