import java.util.Random;
public class testRandom
{
public static void main(String[] args)
{
Random test = new Random();
int[] a = new int[100];
int index;
for(index=0; index
}
index--;
int tempIndex, tempContent;
for(; index>=0; index--){
tempIndex = test.nextInt(a.length);
tempContent = a[index];
a[index] = a[tempIndex];
a[tempIndex] = tempContent;
}
for(int i=0; i< a.length; i++){
if((i%10)==0){
System.out.print("\n\n");
}
System.out.print(a[i]+" ");
}
}
}
也不说一下什么语言...就用JAVA吧...和C也比较像