I cannot see why this should not work - it just stuck in the 'while' loop. Any suggestions? I'm sure I'll feel stupid....
Code:
char response[10];
printf("\nType, 1,2 or 3: ");
fgets(response, 10, stdin);
while (response[0] != '1' || response[0] != '2' || response[0] != '3' )
{
printf("\nResponse = ..%s.. \nTry again: ", response);
fgets(response, 10, stdin);
}
char c = response[0];
if (c == '1')
{
printf("\nSelection 1");
}
else if (c=='2')
{
printf("\nSelection 2");
}
else if (c == '3')
{
printf("\nSelection 3");
}