Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The colors red, blue and yellow are known as the primary colors because they can

ID: 3646302 • Letter: T

Question

The colors red, blue and yellow are known as the primary colors because they cannot be made by mixing other colors. when you mix two primary colors you get a secondary color as shown here:
when you mix red and blue, you get purple
when you mix red and yellow you get orange
when you mix blue and yellow you get green
Design a program that prompts th user to eneter the names of two primary colors to mix. if the user eneters anything other than red, blue, or yellow the program should display an error message. otherwise, the program should display the name of the seconday colr that results.

I have tried to figure out how to put this in RAPTOR, but I am having a hard time. Any help would be greatly appreciated.

Explanation / Answer

Algorithm : =>Initially use a printf statement to prompt the user to enter 2 primary colors =>Using enum assign The 3 primary colors with integers =>red=1 ,blue=2 ,yellow=3 =>red+blue =4 =>red+yellow=5 =>blue+yellow =6 Now initially assign purple =4 orange =5 green=6 ACcordingly output the colors