Source Code
#include <stdio.h>
#include <math.h>
int main(void) {

int n;
int a[100000]={0,0,0,0,0,0};
scanf("%d",&n);
for (int i=0; i<n;i++)
{scanf( "%d",&a[i]);

}
		 
int y=0;
for(int i=0;i<n;i++)
{ 	if(a[i]>a[i+1]){	
         int l=abs(a[i+1]);y++;
	printf("%d",l);break;
	}

}
 if( y==0)printf("%d",0);
	return 0;
}
Copy
Zeina The Business Owner Lyn almousa
GNU GCC C11
3 ms
1.0 MB
Wrong Answer