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 Answers
+ 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
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
okay, thanks
11th Mar 2018, 4:57 PM
Manoel
Manoel - avatar