[Warning] this 'for' clause does not guard... [-Wmisleading-indentation] for(int i=1;i<=n;i++) scanf("%d",&a[i]);