本题要求编写程序,计算序列 1!+2!+3!+⋯ 的前 N 项之和。
输入格式:
输入在一行中给出一个不超过 12 的正整数 N。
输出格式:
在一行中输出整数结果。
我的答案:
#include <stdio.h>
int fac(int n)
{
int num = 1;
int i=1;
for
本题要求编写程序,计算序列 1!+2!+3!+⋯ 的前 N 项之和。
输入格式:
输入在一行中给出一个不超过 12 的正整数 N。
输出格式:
在一行中输出整数结果。
我的答案:
#include <stdio.h>
int fac(int n)
{
int num = 1;
int i=1;
for