Input Format
The first line contains an integer, N. denoting the number of elements to height
Each lines of the N subsequent lines (where 0 i < N) contains an integer describing height, where
height can still be varied
The next line contains an integer, H. denoting the maximum height for the bodas
The next line contains an integer, M. denoting the modulo to be applied on the answer
Answers
Answered by
6
your required ANSWER
mate
Attachments:
![](https://hi-static.z-dn.net/files/dcc/d3ec4d3dfd9c9c58f7a78a0c90ff0bf3.jpg)
![](https://hi-static.z-dn.net/files/dc1/00ec28e7389941ab5d0bf02d720d6c92.jpg)
![](https://hi-static.z-dn.net/files/d46/7d945467fdc7863ce617f6742be87ca5.jpg)
Answered by
7
Answer:
Depends on user input
Explanation:
#include<stdio.h>
int main(){
int N,x,M,H,arr[N];
printf("N=");
scanf("%d",&N); //int N = no. of elements to height
printf("%d heights are ",N);
for(int i=0;i<N;i++){
scanf("%d",&x); //int x = heights
arr[i]=x;
}
for(int i=0;i<N;i++){
if (arr[0]<arr[i]){
arr[0]=arr[i];
}
}
printf("largest element is %d",arr[0]);
return 0;
}
Similar questions