I am getting error which is not specified by coding blocks compiler.
#include
#include
using namespace std;
int main() {
long int n;
cin>>n;
long int a[n],i;
for(i=0;i<n;i++)
cin>>a[i];
sort(a,a+n);
cout<<a[n-1];
return 0;
}
But if i run the same code in code blocks then this code is ruuning smoothly.
Error in code which is not specified by compiler
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.