1st Jan 2024, 3:24 PM
Viraj Yadav
Viraj Yadav - avatar
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.
1st Jan 2024, 3:40 PM
Lisa
Lisa - avatar
0
line 22:in your cycle "i" can not be ever equal to "n".
3rd Jan 2024, 12:47 PM
Borys Bessarab
Borys Bessarab - avatar