I\'ve looked and looked with the debugger and cannot seem to figure out why the IF statement always prints the message.
The IF statement checks to see if yesno != \'
you cannot OR an expression (yesno!='Y') and a statement ("N") which is also an expression. its only two or more expressions that can be combined using || and && to get the required output.
if(yesno!="Y"||"N")
is actually
if(yesno!="Y" || TRUE)
which is always true because:
Exp||TRUE=TRUE
regardless of the expression.
use if(yesno!="Y"|| yesno!="N") // and in this case its && and not || i think