#include #include // To replace the old shufle file. // =============================== // *****************************************************8 void shufle(int ind_case, int n, float a[20]) { int i; switch (ind_case) { case 1: a[0]=999; a[1]=21; a[2]=5; a[3]=37; a[4]=2; break; // ------------------ case 2: a[0]=999; a[1]=44; a[2]=55; a[3]=12; a[4]=42; // a[5]=94; a[6]=18; a[7]=06; a[8]=67; break; // ------------------ case 3: unsigned int iseed; // a seed for random number generator. iseed=1; // for the same iseed values the sequence of the random // numbers generated is the same. srand(iseed); // set the iseed for the random // number generator. a[0]=999; //doesn't participate in the sorting. for(i=1;i<=n;i++) { a[i]=(float)rand()/(float)RAND_MAX; // rand() generates a pseudo-random // in the interval (0,RAND_MAX) // a[i] – receives numbers in the interval (0 1). } break; } } // ******************************************************