Write a program that prompts a user to enter names of colors

Assignment Help Programming Languages
Reference no: EM131316500

The colors red blueand 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

Write a program that prompts a user to enter the names of two primary colors to mix, If the user enters anything other than "red", "blue",or yellow", the program should display an error message. Oterwise the program should display thename of the secondary color that results by mixing two primary colors.

This is a C++ program and needs to be saved as a cpp file.

Reference no: EM131316500

Questions Cloud

Prepare the journal entry to record the annual amortization : Martinez, Inc. acquired a patent on January 1, 2016 for $41,600 cash. The patent was estimated to have a useful life of 10 years with no residual value.  Prepare the journal entry to record the acquisition of the patent on January 1, 2016. Prepare th..
Find an expression for the slope of the production : Draw a production isoquant. Put D on the vertical axis. Put N on the horizontal axis - Draw an isocost fine. Put D on the vertical axis. Put N on the horizontal axis. Find the slope of that line (dD/dN).
Do the low buyback prices offered to us franchisees : Do the low buyback prices offered to U.S. franchisees reflect poor Body Shop ethics or just the economic reality of risky investments?
Provide an equivalent iterative implementation : Write a recursive method that given n, computes the nth term of that sequence. Also provide an equivalent iterative implementation. How do the two implementations compare?
Write a program that prompts a user to enter names of colors : Write a program that prompts a user to enter the names of two primary colors to mix, If the user enters anything other than "red", "blue",or yellow", the program should display an error message.
The company cost of equity capital : The Graber Corporation’s common stock has a beta of 1.2. If the risk-free rate is 5.2 percent and the expected return on the market is 10 percent, what is the company’s cost of equity capital?
Explain the purpose of a company : Explain the purpose of a company's 10-K and how it interprets the firm's financial strength. Write a description of three important items, including their significance to stakeholders, that you learned from reading Ford Motors Company's 10-K for 2..
Pledges to maintain constant four percent growth rate : Lohn Corporation is expected to pay the following dividends over the next four years: $18, $14, $10, and $5.50. Afterward, the company pledges to maintain a constant 4 percent growth rate in dividends forever. If the required return on the stock is 1..
Write the code that will execute according to the program : Design a Windows application and write the code that will execute according to the program requirements in Figure 4-104 and the Use Case definition in Fig 4-105.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a working program for alpha testing

you want to put together the work that has been completed to deliver a working program for alpha testing. You will combine the elements you have written to this point and deliver a working solution.

  Design this program using an algorithm of your choice

Design this program using an algorithm of your choice, draw the flowchart and convert the flowchart into a C++ Program.

  Create a directory called registration

All the pages you created in Assignment One should also be present in Assignment Two not just the new pages or modified pages.

  Design function to accept two integer values

Design function named max that accepts two integer values as arguments and returns the value that is the greater of the two. for example if 7 and 12 are passed as arguments to the function the function should return 12.

  Write a c api program under mysql to solve database query

In earlier assignment, we created a database with the following three relation schemes, where the data type for the attributes s and p is Varchar(10) under the SQL-standard, the data type of the attribute c is Char(6) and the attribute sec is of type..

  You have been tasked with building a payroll program for a

you have been tasked with building a payroll program for a large organization with offices spread across the united

  Program robots with varyingbehaviors

Your task is to program robots with varyingbehaviors - The MemoryRobot remembersall positions that it has previously occupied and never goes back to a position that it knows to be adead end.

  Development of a simple menu driven text adventure

Explain why NO_EXIT has been declared and used in defining the contents of the map array, rather than just directly using the value 99999 in the map array definition

  Write a little man program that adds a column of input value

Write a Little Man program that adds a column of input values and produces the sum as output. An input value of zero will indicate the last value in the input stream of input values.

  Compute the area of a circle

In MIPS assembly, write an assembly language program which asks a user for a decimal number, converts it to hex, prints the result.

  Create two objects p and q and generate 10 random numbers

Create Two objects P and Q. in object P the array a is type int and size 10, in Q array a is string type and size 12b. Generate 10 random numbers

  Create a program named bookexceptiondemo

Create a program named BookExceptionDemo for the Peterman Publishing Company. The company has decided that no published book should cost more than 10 cents per page. Create a BookException class whose constructor re-quires three arguments: a..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd