Stuck in while loop

Nov 6, 2011 at 1:24am
Hello coders,
dealing with relatively easy stuff, but I just don't get it :D
Stuck in while loop by doing simple task:

1
2
3
4
5
6
do
{
printf("\nIllegible number, please repeat: ");
scanf("%d",&choice);
}   
while (choice!=1 || choice!=2 || choice!=3 || choice!=4);


Choice is int btw...

If user types 1,2,3 or 4, then he should get thrown out of the while loop, but it doesn't happen. It keeps repeating over and over again.
Can anyone give me a hint on how to make this work?
Nov 6, 2011 at 1:50am
Try changing all the || to &&'s.
Nov 6, 2011 at 12:03pm
That did the trick, big thanks :)
Topic archived. No new replies allowed.