public static void main(String[] args){ Random rand=new Random(); int x=rand.nextInt(100); for(int i=1;i<=1000;i++){ x=((7^5*x+0)%2147483647); System.out.print(x+" "); if(i%10==0) System.out.println(); } }
实验截图:
public static void main(String[] args){ Random rand=new Random(); int x=rand.nextInt(100); for(int i=1;i<=1000;i++){ x=((7^5*x+0)%2147483647); System.out.print(x+" "); if(i%10==0) System.out.println(); } }
实验截图: