Array sum number

can u see the error in my code,i am not able to identify

@Sumant123,
Your code doesn’t work for the input:
1
9
2
9 9