You are viewing a single comment's thread. Return to all comments →
Hi Buddy,
You have an array index out of bounds in u r code at line 24 because of negative index. Also, add a condition that if length is 1 display YES.
for( int i = 0 ; i < n ; i++) { lc += a[i-1];
Cheers. Good Day.
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 →
Hi Buddy,
You have an array index out of bounds in u r code at line 24 because of negative index. Also, add a condition that if length is 1 display YES.
for( int i = 0 ; i < n ; i++) { lc += a[i-1];
Cheers. Good Day.