General Instructions: Design a flowchart and Pseudo code for an application which will sort and count M&Ms according to the rules and logic below. • You are only allowed to use topics discussed in the...

General Instructions: Design a flowchart and Pseudo code for an application which will sort and count M&Ms according to the rules and logic below. • You are only allowed to use topics discussed in the book up to Chapter 6. You cannot use arrays! • The user must select three colors to count before the loop starts. You must prompt the user for each color. Assume the user will NOT enter the same color more than once. You do not have to write code to prevent this. • There are random number of M&Ms in the bin you are counting, between 1 and 200 M&Ms • You have to count all of the M&Ms in a single pass (loop). This means you can NOT go through the pile once, picking out a single color, then start over and count a different color.Defined Values: Use the following values for the possible M&M colors: • "Red" • "Green" • "Yellow" • "Brown" • "Blue"GetNextMM Function: Create a function which will return a string with the color of the next M&M.Process Steps: 1) Prompt the user for the name of the three colors they would like to count. 2) Count the number of each color of M&Ms using the method you decide works best. This will be some type of loop. When finished, you should have a count for each of the five colors, separately by color. 3) After all M&Ms are counted, print “Selected Colors: “and the names of the three selected colors and the M&M count for only the three colors. 4) Display “Colors Not Selected: “ and the count and color of M&Ms that were not one of the three selected colors.Example of Output:Selected Colors: Red 15 Blue 25 Yellow 10Colors Not Selected: Brown 17 Green 12 NOTE: Use Functions /Modules to reduce the amount and complexity of code. Deductions will be taken if you do not use
Nov 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here