#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\n",temp3,i+1,temp2); temp4+=temp2; } printf("%d\n",temp4); return 0; }