fork download
  1. import java.util.Random;
  2.  
  3. public class Main
  4. {
  5. public static int uniform(int N)
  6. {
  7. return (int) (Math.random() * N);
  8. }
  9. public static void main(String[] args)
  10. {
  11. int M = Integer.parseInt("100");
  12. for (int i = 0; i < 10; ++i)
  13. System.out.println(uniform(M));
  14. }
  15. }
Success #stdin #stdout 0.08s 380224KB
stdin
Standard input is empty
stdout
65
78
37
7
75
10
74
56
5
58