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

  Proc mean data=ex1height

Proc mean data=EX1height;throws what sort of error message

  Write program to enter current value of car

Write a program that asks the user to enter the current value of a car. For a new car, it is the selling price of the car. The program should display the number of years it takes for the car's trade-in value to be below $1000.

  How do you switch between programs & files in microsoft

What is a task pane? Provide examples of three different types of task panes.

  Implement a query functionality to the catalogue

Implement a query functionality to the Catalogue. This will return a list of Albums that match a given criteria. We specify the criteria as a search rule (based on a very simple query language) that is executed against all the Genres and albums in..

  Create a r-wr property named validlastname stores string

Create a read-write property named ValidLastName that stores a String value in the hidden variable mstrLastName.

  Define a command syntax and small-step semantics

Define a command syntax and small-step semantics for if-then (without the else) and extend Agat's type system with a rule for if-then

  Program to input name and price of the item

Program must input name and price of the item and its weight in pounds and ounces. Then it must determine and display unit price per ounce of that item.

  Find minimum number of edits (operations)

Given two strings str1 and str2 and below operations that can performed on str1. Find minimum number of edits (operations) required to convert 'str1′ into 'str2′.

  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.

  A local department store hires you to write down an

a local department store hires you to write an automated checkout program to expedite customers in a hurry. the

  Create a project displays aisle number of movie category

A Search Button should located the correct location. from the array and display it in a lable. Make sure that the user has selected a category from the list and use the list box SelectedIndex property to find the appropriate aisle number.

  Write a prolog program to solve the sudoku puzzle

Write a Prolog program to solve the 6 by 6 Sudoku puzzle distributed in class. Do not use a solution downloaded from the Internet or elsewhere. Write your own. It should be designed along these lines: Label the squares X1, X2, ..., X36 as discuss..

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