CIS 270 Lab 2

Points: 25 Due Date: Tuesday July 29, 2003

This will involve loops and variables.

I want you to first make a for loop that will run for 10 times. During each loop. It will read one number from the user. During the loop, it will calculate the sum of all the numbers entered. It will also find the largest and the smallest number.

You don't need to store all the numbers. You can do this looking at each number as it is read in.

It will also display the numbers that were entered. After the loop is over, you will displaythe sum, maximum and minimum numbers. All the output is displayed using the cout mechanism.

Next will be a while loop that displays 10 numbers, starting at 1 and incrementing by 3 each time.

You will also skip numbers between 2 and 8. Don't print those numbers. Note that the loop generates ten numbers, not just the numbers between 1 and 10. The first three numbers in the sequence are 1,4,7,...

You don't have to check that the user entered a proper number, you can assume they did.


You should turn in a listing of the program. Staple the cover sheet to that.


Think about how you will do this so you can ask questions.
ASK if you have any questions.