(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... :)public static void main(String args[]){
for(int i=1;i<=5;i++){
System.out.println((int)(Math.random()*100));
}
}
}
How do you create random "phone" numbers
ReplyDelete