Question: Write a program to sum non-negative numbers entered by a user. When the user enters one negative number the program should display the sum and

 Write a program to sum non-negative numbers entered by a user.

Write a program to sum non-negative numbers entered by a user. When the user enters one negative number the program should display the sum and the average of the non-negative numbers. If no number was entered to sum, indicate that to the user. Sample output. Your output does not have to be exactly the same. Test with different input numbers. Make sure to fully test your program and provide screen shots to show that your program works properly. Case 1: No valid number entered. Case 2: Input numbers: 10, 8, 9, 4, and 0

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 Databases Questions!