daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Jul 17th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Random;
  2. class Main {
  3.       int max = 100;
  4.     int min = 1;
  5.    
  6.     public String WeirdMethod () {
  7.         Random rand = new Random();
  8.         int weirdgen = min + rand.nextInt(max);
  9.         if ((weirdgen % 2) == 0) {
  10.             if (weirdgen >= 2 && weirdgen <=5) {
  11.                 return "Not Weird";
  12.             }else{
  13.                 return "Weird";
  14.             }
  15.            
  16.         } if ((weirdgen % 2) == 0) {
  17.              if(weirdgen >= 6 && weirdgen <= 20) {
  18.                 return "Weird";
  19.             }else{
  20.                  return "Weird";
  21.              }
  22.             if ((weirdgen % 2) == 0) {
  23.                 if (weirdgen > 20) {
  24.                     return "Not Weird";
  25.                 }else{
  26.                     return "Weird";
  27.                 }
  28.             }
  29.         }
  30.     }
  31.   public static void main(String[] args) {
  32.     Main result = new Main();
  33.     System.out.println(result.WeirdMethod());
  34.   }
  35. }
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