/*-------------------------------------------------------------------*/ /* sumsub8.c */ /*-------------------------------------------------------------------*/ #include int sum8(int a, int b, int c, int d, int e, int f, int g, int h) /* Return the sum a + b + c + d + e + f + g + h. */ { return a + b + c + d + e + f + g + h; } /*-------------------------------------------------------------------*/ int main(int argc, char *argv[]) /* Write the sum 2 + 4 + 6 + 8 + 10 + 12 + 14 + 16 to stdout. */ { int iSum; iSum = sum8(2, 4, 6, 8, 10, 12, 14, 16); printf("The sum is %d.\n", iSum); return 0; }