0
When input is not a or b or c it should get input again. please help me solve it
while( (box != 'a')| (box != 'b')|(box != 'c' )){ printf("please enter a correct name of box "); scanf(" %c", &box); }
2 Answers
+ 1
Try to use && in between the expressions instead. Not sure what you're trying to do here cause it's only a partial code,
+ 1
Try loop with if condition
While(...)
{
If (your expression with or operator)
Statements
Else
Scanf();
}