A-A+

求f(x[0 10])的累加和 其中f(x)=2x+1。#include<stdio.h>i

2022-08-06 10:38:44 问答库 阅读 178 次

问题详情

求f(x[0,10])的累加和,其中f(x)=2x+1。
#include<stdio.h>
int F(int x)
{return______;)/*第一空*/
int SumFun(int n)
{
int x,s=0:
for(x=0;x<n;x++)______;/*第二空*/
return s;
}
main()
{
printf("The sum=%dn",______);/*第三空*/
}

参考答案

正确答案:
x*x+1/*笫一空。此为函数式"f(x)=2x+1的C语言表达式*/
s+-=F(x)/*第二空。求函数式"f(x)"的累加*/
SumFum(10)/*第三空。调用函数"StunFun()求累加值"*/

考点: