-->
当前位置:首页 > 题库

PROGRAMMING:Count the maximum number of occurrences

Luz5年前 (2021-05-10)题库388
Write a program to read a series of integers, find their maximum number, and then calculate the number of occurrences, assuming that the input ends with 0.
###Input format:
Enter the integer number to be counted in one line. Each number can be separated by one or more spaces or carriage returns, ending with 0.
###Output format:
Output in two lines:
The first line format: the largest number is the largest number
The second line format: the occurrence count of the largest number is the number of occurrences
###Input example:
Here is a set of inputs. For example:
```in
3 5 2 5 5 5 0
```
###Output example:
The corresponding output is given here. For example:
```out
The largest number is 5
The occurrence count of the largest number is 4
```







answer:If there is no answer, please comment
Use the while loop to complete