# includelong sum(int n){ if (1 == n) return 1; else return n + sum(n-1);}int main(void){ printf("%ld\n", sum(100)); return 0;}
本文共 226 字,大约阅读时间需要 1 分钟。
# includelong sum(int n){ if (1 == n) return 1; else return n + sum(n-1);}int main(void){ printf("%ld\n", sum(100)); return 0;}
转载于:https://www.cnblogs.com/zhujialei123/p/9630006.html