I have looked all over the forum to find out if this switch statement is legal. I have also banged my head on the wall to try and figure this out. Can a switch statement condition be met by a range? According to my instructions I need to create a range and from that range have it go into a case. I have written something similar to what i need. Does the switch statement need a cin for it to work?
long double main thanks for the quick reply. Your suggestion worked however, it just runs case 2 every time now regardless of the choice. Any idea why?
If they're entering a number, I'd define choice as an integer.
Edit:
You can't use a range on a switch case, but it doesn't need a cin. Switch is looking at the value of an expression and performing different actions depending on the value.
Thanks for the help. I have been trying to do this all day I think my head is getting tired. I had them as "char" earlier and just forgot to convert it over. I understand that the switch case can't be anything but chars or ints for it to go in to its respective case. Thanks for all the help!