Can you tell why I am getting wrong answer

hello @akash_281
a)
image

start i from i.
also use <= in place of <

b)
image
here it should be a[i]>=a[i+1];
same with dec[i]=dec[i+1]+1;

c) also check value of n and declare ur size of array greater than that