What is wrong in the code

@17manishms
hello Manish,
image
it should be a[i-1]


i have modified to a[i-1] but again it is giving me wrong ans

@17manishms
image
this will remain i only.