MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingquestions/comments/s9srdf/helpquestion_programming/
r/programmingquestions • u/Mysterious_Ant_4479 • Jan 22 '22
So that when the user enters the number 1, the other number is assigned the number 400, and when the user enters 2, the other number is assigned 600, and etc
C++ language
1 comment sorted by
1
Somebody’s been staring at their screen too long…
You have three big issues:
You might also consider simplifying this to use an if statement to verify that a > 0 and then do multiplication a = a * 400;
Here’s a good resource to learn more about C++ switch statements: https://www.w3schools.com/cpp/cpp_switch.asp
Hope this helps.
1
u/Salty_Skipper Jan 22 '22
Somebody’s been staring at their screen too long…
You have three big issues:
You might also consider simplifying this to use an if statement to verify that a > 0 and then do multiplication a = a * 400;
Here’s a good resource to learn more about C++ switch statements: https://www.w3schools.com/cpp/cpp_switch.asp
Hope this helps.