Back to Library
QID: #12881
Solution for QID #12881: write program that read a sequence of positive integer input | StudyHelpMe
write program that read a sequence of positive integer inputs and
print the sum of all the input numbers greater than 50. Then your program will also compute the average. Assume that the user always enters a positive number (integer) as an input value or a negative integer as a sentinel value. Please use the below to test your code [ 60 points]: Please use a while loop.
Enter an int value or negative integer value (sentinel value) to end the program: 98
Enter an int value or negative integer value (sentinel value) to end the program: 78
Enter an int value or negative integer value (sentinel value) to end the program: 77
Enter an int value or negative integer value (sentinel value) to end the program: 1
Enter an int value or negative integer value (sentinel value) to end the program: 10
Enter an int value or negative integer value (sentinel value) to end the program: -1
Sum: 253
Average: 84.33
· Note: please use the format specifier for the average value.
for example, print("average: %10.2f " %(average))
ZERO AI
Human Written
Human Written
PHD EXPERTS
Verified
Verified
TURNITIN
Clean Report
Clean Report
FAST DELIVERY
Instant/Hourly
Instant/Hourly