int main()
{
int example[10], i;
for (i = 0; i < 10; i++)
example[i] = i + 1;
ashuf(example, 10);
for (i = 0; i < 10; i++)
printf("%d\n", example[i]);
return 0;
}
void ashuf(int a[], int length)
{
int temp, i, target;
srand(time(0));
for (i = length - 1; i >= 1; i--) {
target = rand() % (i + 1);
temp = a[i];
a[i] = a[target];
a[target] = temp;
}
}