CISC1600: Computer Science I Quiz Lab 1

Instruction: Write a program that reads from the input a list of positive integers until a -1 is entered, and then report the sum and average of these numbers as follows:

An example run of your program is as follows, where the user inputs are underlined, and the program output are shown in regular format:

$ ./a.out
1 2 3 -1
Sum is 6
Average is 2
You can keep the sum and average as integers, and use interger division to calculate the average. Requirement

Coding Style Requirement:

  1. Please indent your code in as required.
  2. Declare a named constant for 23, so that this can be easily changed.
  3. Use descriptive names for variables
  4. Use blank lines to separate the code into appropriate blocks
  5. Be sure to include comments to help others understand your program, and help yourself think!

How to submit

When ready, submit your program on the following link: submit your quiz1.cpp file here.

The autograder will compile your code, and run three testcases.