Tuesday 10 May 2011



(BlueJ)Java Program to generate 5 Random nos. between 1 to 100, and it not follow with decimal point.


Code:
class RandomDemo{
      public static void main(String args[]){
          for(int i=1;i<=5;i++){
              System.out.println((int)(Math.random()*100));
          }
    }
}

Comment below for your Query and Feedback... :)

Related Posts :



1 comment: