Question: In C++ Language: 5. Use a switch statement to output a string representing which color col is. (Hint - using Visual Studio will make this

In C++ Language:

5. Use a switch statement to output a string representing which color col is. (Hint - using Visual Studio will make this easier.)

6. Use a switch statement to assign a color to col based on the character ch when contains the first character of the color in either uppercase are lowercase form. For instance, when variable ch is either 'B' or 'b' assign blue to col; when variable ch is either 'Y' or 'y' assign yellow to col etc.

7-9. Consider the following C++ code:

In C++ Language: 5. Use a switch statement to output a string

7. What is the output if the input is this (note: case must be correct as well):

Hello here 1

8. What is the output if the input is this:

Diamond Art 0

9. What is the output if the input is this:

C++ python 2

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 Databases Questions!