C语言求1到3的阶乘和
#include <stdio.h>
int main() { int n = 3; int sum = 0; int fact = 1; for (int i = 1; i <= n; i++) { fact *= i; sum += fact; } printf('The sum of factorials is %d ', sum); return 0; }
原文地址: https://www.cveoy.top/t/topic/oMSB 著作权归作者所有。请勿转载和采集!