Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Create a program that reads a number that represents a color. If the number is less than 0 or more than 15 , then
C++ Create a program that reads a number that represents a color. If the number is less than 0 or more than 15 , then issue an error and end the program, otherwise, if the number entered between 0 and 15, print the corresponding color based on this list below. Make sure you use an if statement or a switch statement. Color table: 0 Black 1 Blue 2 Green 3 Aqua 4 Red 5 Purple 6 Yellow 7 White 8 Gray 9 Light Blue 10 Light Green 11 Light Aqua 12 Light Red 13 Light Purple 14 Light Yellow 15 Bright White
C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started