Still having problem

I had made the changes in code as per ur direction…

but when i m executing my code it gives wrong output…
i m trying for this input
1
6
12 4 78 90 45 23

the output should be 5 but my code is giving 4…

i request you to firstly execute my code and see the output and then correct my code regards…

code link…

regards.


line 35 it should be a[i+1]
instead of a[i-1]