Module: (C++) Loop statement with condition - while

Problem

20
/21

How many elements equal to the maximum

Problem

The sequence consists of natural numbers and ends with the number 0. Determine how many elements of this sequence are equal to its largest element.

Input
A sequence of natural numbers is entered, ending with the number 0 (the number 0 itself is not included in the sequence, but serves as a sign of its termination).