hey, i want to make a yes or no question,
if (yn=='Y' || yn=='y')
goto sem;
else if (yn=='N' || yn=='n')
{
cout<<"Thanks" <<endl;
}
else if(yn!= 'y' || 'n' || 'Y' || 'N')
{
cout <<"only (y/n) are allowed" <<endl;
goto ask;
}
else
{cout<<"false"<<endl;}
that's my code,
but my problem is when i input "yes" or any words that start with y, the program think it as 'y'
any idea to solve this problem??
thank for any suggest
Also i'm not sure on this as I don't program this way (sorry) but i think when your checking for a single letter all it does is read the first letter of what word you enterd. That i'm not exactly sure how to fix sadly enough haha. I'm sure i've done it a while ago but can't think of it off the top of my head. Don't worry though someone here is sure to know :)