+ 1
Can anybody help me with this code
https://sololearn.com/compiler-playground/cscum5SwXv1p/?ref=app
2 Answers
+ 2
In line 14, it should be i<n â indexing starts at 0
line 16 it should be a[i] â you want to compare the element at index i, not always the 1st element only.
0
line 22:in your cycle "i" can not be ever equal to "n".