(Occurrence of max numbers) Write program that reads integers, finds the largest of them, and counts its occurrences. Assume that the input ends with…