COSC 1315 - Fundamentals of Programming
Allan Kochis

Homework Assignment 9


Statistics


Write a flowchart and C++ to read in an arbitrary number of data items ( less than 150) and produce the shown output.

Enter input (-99) to quit
90 61 85 87 93 61
97 67 70 68 83 64
65 92 88 68 76 81
89 84 71 73 72 87
72 93 70 97 86 72
64 67 85 77 67 97
90 62 93 92 95 90
78 73 96 86 80 73
79 63 91 75 61 95
76 63 91 71 94 84
64 84 97 69 99 93
82 87 83 99 76 94
84 98 78 88 70 63
60 90 73 82 82 74
75 70 94 84 78 71
62 89 67 67 66 85
91 68 75 -99
 

99 data values
7881.00 is the sum
79.61 is the mean (average)
10.01 is the average deviation
99.00 is the maximum
60.00 is the minimum
Press any key to continue . . .
Turn in both a flowchart and C++ program