Algorithm generates a designated number of random number

Package text;
 Import java.util.Scanner;
 public  class Random {
     public  static  void main (String [] args) {
     int A = 13 is, B = 35, m = 87, Xo =. 19 ;
     int Z = Xo; 
    the System.out .print ( "Please enter the number of random number generation:" ); 
    Scanner CIN1 = new new Scanner (the System.in);
     int J = cin1.nextInt ();
     int Q = 0 ;
     for ( int n-= 0; n-< J; n-++ ) {
     int Y = n-+. 1 ;
     int Xy = (A * B + Z)% m;
    z=Xy;
    q++;
    System.out.print(z+"\t");
    if (q % 10 == 0)
        System.out.print("\n");
    }
}
}

 

Guess you like

Origin www.cnblogs.com/fengjingfei/p/11595296.html