Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

This program requires you to use a loop as well as the switch statement. You will display this menu on the screen.

(Press 9 to stop voting)

The Many Colors of M&M's Candy

  1. red
  2. blue
  3. brown
  4. yellow
  5. green
  6. purple

Vote on your favorite color by pressing the number before it.

In this program, you will keep track of the number of votes for each color of M&M's candy. The user will be able to vote until he/she types the sentinel character 9. Display the menu and ask the user to enter a number. Check the number entered against the numbers 1 - 2 - 3 - 4 - 5 - 6. If the number entered is 1, add one to the redctr. If the user has entered 2, add one to the bluectr, etc.

When the user has pressed the 9 to exit, print out a display telling how many votes each color received.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92749173
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

Mark harris just received a cash gift from his grandfather

Mark Harris just received a cash gift from his grandfather. He plans to invest in a five-year bond issued by Cullumber Corp. that pays an annual coupon rate of 4.5 percent. If the current market rate is 7.50 percent, wha ...

You have been recently hired as a senior database

You have been recently hired as a senior database administrator. Your organization has many SQL Server databases that run various applications. Your manager has asked you to present to the junior database administrators ...

I am struggling with this programmign exersice and would

I am struggling with this programmign exersice and would love to get some insight. any help would be greatly appreciated. Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and ...

Suppose that you have a singly-linked list l containing the

Suppose that you have a singly-linked list L containing the sequence of numbers (1,2,3,4,5,6,7,8,9). Suppose further that you have an initially empty stack S. i) Give a pseudo-code description of a method that uses only ...

Question state the dilemma the score as he puts it harnish

Question : State the dilemma ("the score", as he puts it) Harnish finds between the Humean view and the Frege-Russell view of representation. Do you think a computational theory of mind is a viable alternative to these v ...

Answer as thorough as possiblenbspinclude an explanation of

Answer as thorough as possible, Include an explanation of your recommendations or trading strategies. Should you early exercise the following American-style put option? If not always, under what situation would you early ...

How do you apply the five components of the information

How do you apply the five components of the information systems to an information systems application like "online bill pay" system offered by many banks.

We are evaluating a project that costs 1120000 has a

We are evaluating a project that costs $1,120,000, has a ten-year life, and has no salvage value. Assume that depreciation is straight-line to zero over the life of the project. Sales are projected at 64,000 units per ye ...

Assignmenta in the slides and textbook one of the examples

Assignment (a) In the slides and textbook, one of the examples features a class for counting up. An interface which defines this functionality is given below: public interface IncrementCounter { //Increments the counter ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As