问题
填空题
以下程序通过函数sunFun求
f(x)。这里f(x)=x2+1,由F函数实现。请填空。
main()
{ printf ("The sum=%d\n",SunFun(10));}
SunFun(int n)
{ int x,s=0;
for(x=0;x<=n;x++)s+=F(______);
return s;
}
F(int x)
{ return(______);}
答案
参考答案:x, x*x+1