SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Foo {
  2.     public static void main(String args[]) {
  3.         int counter = 0;
  4.         while(true) {
  5.             counter++;
  6.             if (counter % 5 == 0) {
  7.                 if (Math.random(4)+1 == 1) {
  8.                     System.out.println("Found it after " + counter + " minutes");
  9.                     break;
  10.                 }
  11.             }
  12.         }
  13.     }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top