Hey! I was practicing my programming skills with some simple exercises because I am a beginner. Whenever I start debugging this program, if I choose 1, for example, it automatically gives me the default statement. If I choose 1, I should receive the cout << "You chose Sprite\n";. Please take a look at my code! Thanks (:
The way that u wrote the prompt of "Please choose a number 1 through 5" means the user is expecting to press a number 1-5. But here:
case'A':
U'r testing if the user pressed exactly a capitol letter 'A'. A simple fix is to change line 20 (and other 'case' lines) to case 1:
U'll also notice that u wont need lines 21,25,29,33,37 anymore since Answer has the value u want.
Extra:
Ur Answer variable is declared as an int so when u use 'cin' on line 17, it will try to put an int for whatever u pressed into Answer. So, if u'r not testing ints in ur switch statement then u'll have issues like u did...
Oh and put 'int Answer' between lines 13 and 14. Start with good habits ;)