1-5阶乘

#include "stdafx.h"

int main()
{
int temp=5;
int temp2=1;
int temp3;
int temp4=0;

for(int i=1;i<=5;i++)
{
temp3 = temp2;
temp2 = temp2*(i+1);
printf("%d*%d=%d
",temp3,i+1,temp2);
temp4+=temp2;
}
printf("%d
",temp4);
return 0;
}

  

原文地址:https://www.cnblogs.com/YuzurihaInori/p/6224521.html