I want to output several questions, but in a random order. How can I ask all questions randomly without repeating one?
for(int i=0; i<4; i++)
{
int question=rand()%4;
switch(question)
{
case 0:
NSLog(@"What is your name");
break;
case 1:
NSLog(@"Who are you");
break;
case 2:
NSLog(@"What is your name");
break;
case 3:
NSLog(@"How do you do");
break;
case 4:
NSLog(@"Are you?");
break;
}
}