标签:ati stat span code problem 调用函数 return for i++
#include<stdio.h> double fact(int i); int main() { int i; float sum=0; for(i=1;i<=10;i++) sum=sum+fact(i); printf("%.6f\n",sum); return 0; } double fact(int i) { static int j=1; j=j*i; return(j); }
Problem B: 调用函数,求1!+2!+3!+......+10!
标签:ati stat span code problem 调用函数 return for i++
原文地址:https://www.cnblogs.com/chenlong991223/p/9880249.html