Computer Science, asked by kumarrahul1365, 3 months ago

Write a program that asks a user to input for a positive number let’s say N. The program then asks the user for N number of positive integers. The program is to determine the largest value among the numbers and the number of times it occurred. For example, if the user enters 5, your program should ask 5 numbers, for example, 4 2 5 1 5, and display the Highest: 5 and
its Occurrence: 2.
Input: 5 Output: Highest: 5 4 2 5 1 5 Occurrence: 2

Answers

Answered by nivasravirajkumar
1

largest value among the numbers and the number of times it occurred. For example, if the

user enters 5, your program should ask 5 numbers, 4 2 5 1 5 and display Highest: 5 and

its Occurrence: 2.

Input: 5 Input: 10

4 2 5 1 5 5 2 15 3 7 15 8 9 5 2

Output: Output:

Highest: 5 Highest: 15

Occurrence: 2 Occurrence: 2

Similar questions