I have a problem with my code. It always ignoring the if(userDigit<=6 && userDigit>=1).. Can someone tell me what is wrong here?
for(i=0; i<4; i++)
{
userDigit=getch();
putch(userDigit);
if(userDigit<=6 && userDigit>=1)
{
//code
}
else
{
correct=0;
}
}
if(correct == 0)
{
printf("wrong");
correct++;
}