Question: Exercise 3 Write a program that asks the user for entering certain values, until he / she ends the program by entering - 1 .

Exercise 3
Write a program that asks the user for entering certain values, until he/she ends the program by entering -1. When the user finishes entering the numbers, the program should display the number of entered numbers, their sum, average and the maximum.
Sample run:
Enter a value (-1 to end program): 34
Enter a value (-1 to end program) : 56
Enter a value (-1 to end program): 77
Enter a value (-1 to end program): -1
You entered 3 values
Their sum is: 167.0
Their average is 55.67
The highest number is: 77.0
Exercise 3 Write a program that asks the user for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!