is there any problem with this code.??it gives the output but still its showing error.
#include<stdio.h>
int main()
{
int i,n,j;
int ch[5];
scanf("%d",&n);
for(j=0;j<n;j++)
{
scanf("%d",&ch[j]);
}
for(i=0;i<n;i++)
{
if(ch[i]<ch[i+1])
printf("\n%d",ch[i]);
else
break;
}
if(ch[i]>ch[i+1])
printf("\n%d",ch[i]);
return 0;
}