×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Vasilii Vasilev
Added: May 2, 2014 11:08 AM
Views: 3
Tags: random while
  1. double r = 0;
  2. int i = 1;
  3. while (r < 0.9999){
  4.     r = Math.random();
  5.     System.out.println(i + " " +r);
  6.     i++;
  7. }