How to create a java to generate the random integers and print the integers?

this promotion will screen-print 10 random numbers in between 0 plus 100
training Example

open public void fn()

int my partner and i, n;
for(i=1; i<=10; i++)

n=(int)Math.random()*100;
Process.out.println(n);

import coffee.math.*;
significance java.util.Shield;
training RandomNum

open public static avoid main(String args) brings Exception

int num, in;
Shield inp=new Scanner(System.in);

Process.out.print(“\n Enter in n:”);
n=inp.nextInt();

Process.out.print(“\n The actual random phone numbers are”);
for(int i=0; i<n; i++)

num=(int)(Math.random()*10000);
Process.out.print(“, “+num);

Process.out.println(“\n”);

import coffee.util.Hit-or-miss
Hit-or-miss rand = innovative Random()
int utmost = 10
def randomIntegerList =
(1..10).each
randomIntegerList << rand.nextInt(max+1)

Leave a Reply