I would create an array
int values[10]
for(int i=1;i<=10;i++)
{
values = i;
}
then use the random function to swap the values in the array n amount of times.
int temp,swap1,swap2;
for(int x = 0; x < times_to_swap; x++)
{
swap1 = rand%10;
swap2 = rand%10;
temp = values[swap1];
values[swap1] = values[swap2];
values[swap2] = temp;
}
On a side note you may want to seed the random fucntion with time
Matt