Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Flowchart with diagrams using C + + coding Determine the minimum, maximum and calculate the arithmetic mean of numbers read in from the
Create a Flowchart with diagrams using C coding Determine the minimum, maximum and calculate the arithmetic mean of numbers read in from the keyboard. calculate the arithmetic mean add up all the numbers sum and then divide by the number of them read in
Store the answer in a variable, say n Next prompt the user for the first number and read it into a variable called value Since there is only one number, it is the smallest, largest and the sum. So store value in variables for these quantities. Next, a variable called count should be set to indicating one number has been read in
Next, loop reading in values and processing them. use a ForLoop, while count is less than n do the following: prompt for and read a value if the value is greater than the largest then largest gets the new value if the value is less than the smallest then smallest gets the new value add the new value to the sum. add one to count.
After the loop has completed when all n values have been processed divide sum by count to get the arithmetic mean. Finally, output the smallest, largest, mean and n When you print this information to the monitor make sure all values are properly labeled and in tabular form for
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started