#include int func_sum(int n) { int sum = 0, i; for( i = 0; i <= n; i++ ) { sum += i; } return sum; } int main() { int i; int sum_result = 0; sum_result = func_sum(100); printf("\nThe sum of 1~100 is %d\n", sum_result); sum_result = func_sum(200); printf("The sum of 1~200 is %d\n\n", sum_result); return 0; }