Write a c++ 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, 4 2 5 1 5 and display Highest: 5 and its Occurrence: 2.
Input: 5 Output:
4 2 5 1 5 Highest:5 Occurance: 2
Input: 10 Output:
5 2 15 3 9 15 8 7 3 1 Highest: 15 Occurance: 2
Answers
Answered by
0
Answer:
Did you mean: Write a c++ 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, 4 2 5 1 5 and display Highest: 5 and its Occurrence: 2. Input: 5 Output: 4 2 5 1 5 Highest:5 Occurence: 2 Input: 10 Output: 5 2 15 3 9 15 8 7 3 1 Highest: 15 Occurrence: 2
Similar questions
Math,
2 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Physics,
10 months ago
Math,
10 months ago