Every time I run my program, and enter a character, my program prints the correct output (for example if I enter 'n' the first time, my program outputs "you've deposited 5 cents"), but then it also outputs the default message every time ("Whoops you've entered the wrong command, please try again."). Why is it printing this?
Look very closely at what keys you press when you enter a character. Say it's 'n' the first time. Don't you also hit the enter key? That's the character your program is reading the second time.
deceptikon
Challenge Accepted
3,428 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 56