[Solved] A program that reads numbers from the input stream until a zero is encountered.

$25

File Name: A_program_that_reads_numbers_from_the_input_stream_until_a_zero_is_encountered..zip
File Size: 744.18 KB

SKU: [Solved] A program that reads numbers from the input stream until a zero is encountered. Category: Tag:
5/5 - (1 vote)

Write a program that reads numbers from the input stream until a zero is encountered. Display the average (rounded down to an integer), the maximum number and the minimum number. Assume that numbers entered will be between 1 and 1000. For example:

Enter a number: 33

Enter a number: 88

Enter a number: 77

Enter a number: 22

Enter a number: 66

Enter a number: 55

Enter a number: 0

Average: 56

Max: 88

Min: 22

Another example:

Enter a number: 0

No data, so no answers!

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] A program that reads numbers from the input stream until a zero is encountered.
$25