I'm new to C so I'm sorry if it's a really silly mistake, but I can't seem to figure out why my code isn't working. All it should do is take in input from the user until the user inputs either "y" or "n". However, the loop doesn't break when I input "y" or "n" (or anything else!).
do{
printf("Would you like a daily newspaper (y/n): "
scanf("%c",&news); //get newspaper preference
news= tolower(news);
fflush(stdin);
}while((news != 'y') || (news != 'n'));
I tried running the bits of code individually, and it seems to be working then. Not sure what I've done wrong.