Lab 9 Algorithm
-
Display Greeting
-
Initialize sum and count to 0
-
Get first integer, number
-
Initialize min and max to first integer, number
-
Repeat step 6 through 10 while number is not 0
-
Add number to sum
-
Increment count
-
If number is greater than max, update max to number
-
If number is less than min, update min to number
-
Get another integer, number
-
Calculate average as sum divided by count
-
Calculate range as max minus min
-
Display count, min, max, range, and average
-
Ask if user wants to continue
-
Repeat steps 2 through 14 if response is affirmative