You are viewing a single comment's thread. Return to all comments →
for( int i = 0 ; i < n ; i++) {
lc += a[i-1]; ... You will get ArrayIndexOutOfBoundsException for i=0
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Array
You are viewing a single comment's thread. Return to all comments →
for( int i = 0 ; i < n ; i++)
{