Visit www.myprogramminglab.com to complete select exercises online and get instant feedback.
Exercise
Write a program that calculates the average of N integers. The program should prompt the user to enter the value for N and then afterward must enter all N numbers. If the user enters a nonpositive value for N, then an exception should be thrown (and caught) with the message “N must be positive.” If there is any exception as the user is entering the N numbers, an error message should be displayed, and the user prompted to enter the number again.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.