Alguém pode me ajudar com o erro "Index was outside the bounds of the array" | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Alguém pode me ajudar com o erro "Index was outside the bounds of the array"

https://code.sololearn.com/ca1xbqLZRx7y/?ref=app

11th Mar 2018, 3:49 PM
Manoel
Manoel - avatar
2 ответов
+ 3
Try running the loop from 0 to n-1 instead of n. Thus, the loop looks like : for(int i=0;i<n;i++) { } Secondly, remove the semicolon after the loop to get the code below it to run.
11th Mar 2018, 4:51 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
okay, thanks
11th Mar 2018, 4:57 PM
Manoel
Manoel - avatar