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, 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
Answers
in which language we have to write the program please tell
Answer:
Write a C program that accepts a positive integer n less than 100 from the user and prints out the sum 14 + 24 + 44 + 74 + 114 + • • • + m4 , where m is less than or equal to n. Print appropriate message.
If the input is outside the range.
Test data and expected output:
Input a positive number less than 100:
Sum of the series is 1024388
Sample Solution:
C Code:
#include <stdio.h>
int main() {
int i, j, n, sum_int = 0;
printf("Input a positive number less than 100: \n");
scanf("%d", & n);
if (n < 1 || n >= 100) {
printf("Wrong input\n");
return 0;
}
j = 1;
for (i = 1; j <= n; i++) {
sum_int += j * j * j * j;
j += i;
}
printf("Sum of the series is %d\n", sum_int);
return 0;
}
plss mark as brainliest and vote answer and follow me and thank answer