Computer Science, asked by rampostbox311, 4 days ago

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 FFdevansh
6

your required ANSWER

mate

Attachments:
Answered by adventureisland
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