CoolLegatoDude

Untitled

May 17th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. /** Here's my quickie just to ease my decicions.
  2.  ** Quit by choosing '0' to be maximum
  3.  **/
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class Randomizer {
  8.     public static Scanner lue = new Scanner (System.in);
  9.     public static void main (String wifuaouf[]) {
  10.         System.out.println("*** Randomizer ***");
  11.         int i = 0;
  12.         while (i == 0) {
  13.             System.out.print("\nMaximum: ");
  14.             int max = lue.nextInt();
  15.             if (max == 0)
  16.                 break;
  17.             int random = (int)(1+max*Math.random());
  18.             if (random == 0) {
  19.                 System.out.println("If you see this,\n you have done \nsomething impossible\nso fuck yourself silly");
  20.                 break;
  21.             }
  22.             System.out.print("\nRandom: "+random+"\n");
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment