#include #include // This program computes the sum of the first n numbers, e.g., // when n = 5, the sum is 5+4+3+2+1 = 15 // // The sum is computed for n = 5, 10, 15, ..., 50 int main() { long int i, j, total; for (i = 5; i<=50; i += 5) { total = 0; for (j = 1; j<=i; j++) { total += j; } cout << "The sum of the first " << i << " numbers is " << total << endl; } }