You are viewing a single comment's thread. Return to all comments →
int sum = 0; int i = 0; while (i < n){ sum += ar[i]; i += 1; } return sum;
Seems like cookies are disabled on this browser, please enable them to open this website
Simple Array Sum
You are viewing a single comment's thread. Return to all comments →
int sum = 0; int i = 0; while (i < n){ sum += ar[i]; i += 1; } return sum;