Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pls do not use using name std; pls don't use it 4.2 - If/Else (Part 2] / 11. Playing With Colors saved 20 points possible

Pls do not use using name std; pls don't use itimage text in transcribed

4.2 - If/Else (Part 2] / 11. Playing With Colors saved 20 points possible Reset to Starter Code Ask the user to enter the name of one primary color (red, blue, yellow) and a second primary color that is different from the first. Based on the user's entries, figure out what new color will be made when mixing those two colors. Use the following guide: red and blue make purple blue and yellow make green yellow and red make orange If the user enters anything that is outside one of the above combinations, return an error message. Prompts Enter a primary color (red, blue, yellow): [possible user input: red] Enter a different primary color (red, blue, yellow): [possible user input: blue] Possible Outputs: red and blue make purple blue and yellow make green yellow and red kake orange You entered invalid colors Notes and Hints 1) The program should work regardless of the color order. In other words, it shouldn't matter if the user enters red or blue first..the two colors make purple. 2) Regarding #1, this means that the first three outputs shown above may appear with the colors in a different order. Hint: Use variables in your output to make this easy! 3) If the user has any uppercase letters, it will not work. This is normal, as C++ is case sensitive. 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago