Gaddis Chapter 8 Number Analysis Program Exercise

From Knowledge Kitchen
Jump to navigation Jump to search

Number Analysis Program

Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in a list and then display the following data:

  • The lowest number in the list
  • The highest number in the list
  • The total of the numbers in the list
  • The average of the numbers in the list


The program should validate users' responses.

  • If a user enters an invalid response (anything that is not an integer or a floating point number), the program should ask them to enter that number again
  • The program must receive 20 valid numbers from the user before any of the above calculations are performed