Hi all. I'm having a minor problem with cases in my program. If I enter a number that is out of my case range (say I enter a 10 when there are only 4 cases) I've got my default to output an error prompt. When I enter a character, say 'F', the program loops forever. How do I fix this?
hezfast2
0
Light Poster
Recommended Answers
Jump to PostI took your program and cleaned it up to where all it was is a simple switch statement. There are multiple ways you can fix your problem, the easiest of which would be to change the variable that goes through the switch statement (in your code, its the variable 'choice')
…
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.