#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main( ) { int num = 1; int x = 0; int sum = 0; for (x = 1; x <= 10; x++) { num = num * x; sum += num; } printf("for循环,1-10阶乘的和是%d", sum); return 0; }
标签:语言,int,代码,练习,改进,main From: https://www.cnblogs.com/ayue6/p/17740954.html