Question: write a c++ switch statement which sets (assigns) the colorvalue based on a number entered by the user. Use variables color (astring) and number (an
write a c++ switch statement which sets (assigns) the colorvalue based on a number entered by the user. Use variables color (astring) and number (an int). Use the values in this (assign "null"to the color if the number is not in this table):
number color
1 red
2 blue
3 yellow
A C++ code, plz make sure it works when you compileit.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
