Hi I am trying a very simple code but still test cases are failing. So is there a way to check the input due to which the test cases are failing?
Here is my program-
#include
using namespace std ;
int main(){
long int n;
cin>>n;
long int a[n] ;
long int max =0;
for(long int i=0;i<n;i++){
//cout<<a[i];
if(max>a[i])
{
max = a[i] ;
}
}
cout<<max ;
return 0;
}
It’s in the challenges section. Challenge Name is Arrays-Max Value In Array.