#include <stdio.h>
#include <stdlib.h>
int the_permutation[32];
int i,j,temp;
void randomn( int n) {
for (i = 0; i < n; i++) {
the_permutation[i] = i;
}
for (i = 0; i<n; i++) {
j = rand()%32;
temp = the_permutation[j];
the_permutation[j] = the_permutation[i];
the_permutation[i] = temp;
}
return ;
}
void printarray(int n, int a[n]) {
int i = 0;
for (i= 0; i < n; i=i+2) {
printf("%i->%i %i->%i\n", i ,a[i],i+1,a[i+1]);
}
}
int main(void) {
srand(23467);
randomn(32);
printarray(32, the_permutation);
printf("\n");
return 0;
}