#include #include #include using namespace std; //function prototypes void randomize(int ar[], int n); void printArray(int ar[], int n); int main(void) { int nums[] = { 1, 2, 3, 4, 5, 6, 7}; int n = sizeof(nums) / sizeof(nums[0]); //find the number of elements //seed the PRNG srand(time(0)); //print the orderings of the array printArray(nums, n); randomize(nums, n); printArray(nums, n); randomize(nums, n); printArray(nums, n); return 0; } void randomize(int ar[], int n) { int i, d, tmp; for(i=0; i