Java Blog

 
 
 
 public class JAVA_016
 {


    public static void main(String[] args)
    {
       int number=(int)(100*Math.random( ));

       if((number%2)==0)
          System.out.println(\"The Random Number Generated (0-99) is Even : \" + number);

       else
          System.out.println(\"The Random Number Generated (0-99) is Odd : \" + number);
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to show the use of If-Else Statement