Explore BrainMass
Share

Explore BrainMass

    Keeping Track Of Votes for M&M Colours

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Useing a loop and switch statement. 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 types the sentinal character 9. Display the menu and ask the user to enter a number. Check the number entered aginst the display numbers 1-2-3-4-5-6. If the number entered is 1, add one to the redctr. Ig the user enters 2, add one to the bluectr ect....
    1-red, 2-blue,3-brown,4-yellow,5-green,6-purple. Vote your favorite color by pressing the number before it.

    © BrainMass Inc. brainmass.com October 9, 2019, 3:46 pm ad1c9bdddf
    https://brainmass.com/computer-science/programming-language-theory/keeping-track-votes-mnm-colours-12785

    Solution Summary

    This solution provides a sample program for a student tutorial.

    $2.19