I'm about at my wit's end here. All I'm trying to do is get this function to work. Every time it hits it, it'll go through the if statement whether or not the condition in parenthesis is true. I know there's something small I'm missing. Any help? I've also tried it as a while loop, and that just keeps providing the error message I wrote it to and asking for the input infinitely.
Solution : Replace each || with && .
Also, consider replacing the if statement for a while loop, so the user never enters a wrong choice.
Consider this piece of code :