spenk

Untitled

May 25th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. import java.util.Arrays;
  2. import java.util.List;
  3. import java.util.Random;
  4.  
  5.  
  6. public class roulette {
  7.  
  8.     static Random rand;
  9.     static int random;
  10.    
  11.     static String[] red = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"};
  12.    
  13.     static List<String> redNums = Arrays.asList(red);
  14.    
  15.     public static void main(String[] args) {
  16.         random = rand.nextInt(41);
  17.         if (redNums.contains(rand)){
  18.             System.out.println("You have a red number");
  19.         }else{
  20.             System.out.println("You have a black number");
  21.         }
  22.         return;
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment