Display telling how many votes each color received

Assignment Help Basic Computer Science
Reference no: EM131910507

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.

Reference no: EM131910507

Questions Cloud

Draw the circuit described by the expression : Build this circuit on a breadboard and derive a truth table as you did in Procedure 1. There are four variables in this circuit so the values will range from 00
Complete the queue class by implementing dequeue : CMPT 145 Lab: Objects and Classes. ACTIVITY: Complete the Queue class by implementing dequeue. ACTIVITY: Write a short script to test it
Calculate and display the architect fee : Design an algorithm that will acceptthe cost of a building and calculate and display the architect's fee
Why efficiency and memory useful in programming : What is data manipulation important and why efficiency and memory useful in programming?
Display telling how many votes each color received : When the user has pressed the 9 to exit, print out a display telling how many votes each color received.
Explain how do you see author as fitting into post-modernism : Explain how do you see this author as fitting into post-modernism? Be sure to connect with the poems you selected.
WHAT IS THE NPV of BUYING vs RENTING : Making Money, Inc. is considering the purchase of new truck so it can make more money. WHAT IS THE NPV of BUYING vs RENTING?
Discuss your initial response to the clugston quote : Discuss your initial response to the Clugston (2014) quote from Week One. Based on what you learned about literature, what has changed?
What is the value of the conversion option implied : Assuming that this advice is correct, what is the value of the conversion option implied?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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