#include<stdio.h>int sum(int n){ int p=1,s=0,i;for(i=1;i<=n;i++)s+=(p*=i);return(s);}void main( ){ printf(“sum(5)=%d\n”,sum(5));} 查看完整描述