求1加到10的阶乘 #include<stdio.h> int main() { int n = 0; int m = 1;//储存阶乘 int sum = 0;//求和 for (n = 1; n <= 3; n++) { m = m * n; sum = sum + m; } printf("%d", sum); return 0; } 来源:CSDN作者:贪心的柠檬链接:https://blog.csdn.net/qq_42627691/article/details/104145714 标签 阶乘