Skip to content
Snow College Home
CPSC 1710 - Assignments
CPSC 1710 - Lecture Notes
CS 1400 - Definition
CS 1400 - Homework #13
CS 1400 - Homework #34
CS 1400 - Homework #5
CS 1400 - Homework #6
CS 1400 - Lecture Notes
CS 1400 - Outline
CS 1400 Schedule
CS 1400 Schedule
Home
Academics
Natural Science and Mathematics
Resources
Garths
CS 1400
CPSC 1710 - Assignments
CPSC 1710 - Assignments
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
©