Skip to content

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

(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… 🙂

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

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!