Write a program which reads integers until 0 is read. Then finds the minimum and maximum of these
integers (except 0), multiplies them with the number of integers entered (except 0), and prints
the results on the screen. Assume only positive integers smaller than 10000 will be entered.
For example, in the first input/output example, the minimum is 2, the maximum is 9, the number of integers entered is 6.
Therefore, the outputs are 12 and 54, since 2*6 is 12 and 9*6 is 54.
Examples:
3 4 7 2 8 9 0
|
12 54 |
12 10 7 5 19 6 2 22 0
|
16 176 |
1 1 1 5 5 5 0
|
6 30 |
Important issues about all exams/projects/quizzes:
- Update just Question.c file, not Question.txt.
- Make changes only between the following comments(DO NOT modify these comments or anything outside the region marked by the comments):
- // DO_NOT_EDIT_ANYTHING_ABOVE_THIS_LINE
- // DO_NOT_EDIT_ANYTHING_BELOW_THIS_LINE
- If you modify these comments for any reason, you can copy/paste the initial version from Question.txt into Question.c. Note that Question.txt is not graded at all, so anything you write in Question.txt will be discarded.
- To avoid getting the 'Binary Not Found' error, SAVE and BUILD your code before RUN.
- Do not add any extra messages message for input/output such as 'Enter an integer:', 'The result is:', etc. Any additional text that appears in the output will cause you to get no points from the question.
- Input and output of your program must be just like those in the Examples table above.