main()
{
int i,j,n,sum=0;
for(i=1;i<=10;i++)
{
n=1;
for(j=1;j<=i;j++)
n*=j;
sum+=n;
}
printf("%d\n",sum);
}
#include
using namespace std;
void main()
{
int i,n=1,sum=0;
for(i=1;i<=3;i++)
n*=i,sum+=n;
cout<<"1!+2!+···+10!="<
//运行结果1!+2!+···+10!=4037913
//不错吧?!
#include
void main()
{
int i,j,t=1,s=0;
for (i=1;i<=10;i++)
{
t=t*i;
printf("%d+",t);
s=s+t;
}
printf("\b=%d\n",s);
}
#include
void main()
{
int i,j,n,sum;
sum = 0;
for(i=1;i<=10;i++)
{
n = 1;
for(j=1;j<=i;j++)
{
n=n*j;
}
sum = sum + n;
}
printf("%d",sum);
}
int x = 1;
for (int i=2; i<10; ++i)
{
x*=i;
}
printf("1*...*10 = %d", x);