My issue
why my answer is coming wrong?
My code
#include <stdio.h>
int main(void) {
int T;
scanf("%d", &T);
for (int t = 0; t < T; t++) {
int N;
scanf("%d", &N);
int max_height = 0;
for (int i = 0; i < N; i++);
{
int height;
scanf("%d", &height);
if (height > max_height)
{
max_height = height;
}
}
printf("%d\n", max_height);
}
return 0;
// your code goes here
}
Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-dsa-c/MUJDSAC06/problems/UWCOI20A