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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!