首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序通过函数SunFun()调用F(x),x的值从0到10,这里F(x)=x2+1,由F函数实现,请填空。 #include <stdio. h> int SunFun(int); int F(int);
以下程序通过函数SunFun()调用F(x),x的值从0到10,这里F(x)=x2+1,由F函数实现,请填空。 #include <stdio. h> int SunFun(int); int F(int);
admin
2009-01-15
33
问题
以下程序通过函数SunFun()调用F(x),x的值从0到10,这里F(x)=x2+1,由F函数实现,请填空。
#include <stdio. h>
int SunFun(int);
int F(int);
main ( )
{ pfintf( "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
解析
本题考查函数的调用。P(x)的含义为x的平方加1,所以第一处应填x;第二处应填x*x+1。
转载请注明原文地址:https://jikaoti.com/ti/ZHK0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
(1)在考生文件夹下有一个工程文件sjt3.vbp,相应的窗体文件为sjt.frm。其功能是随机产生30个0~1000的整数,放入一个数组中,然后输出其中的最小值。程序运行后,单击命令按钮(名称为Command1,标题为“输出最小值”),即可求出其最小值,
(1)在考生文件夹中有一个工程文件sjt3.vbp。程序的功能是输入用户名和密码。程序运行时,当向文本框Text2中输入密码时,若“显示密码”复选框没有被选中,则在文本框Text3中同时显示“#”(如图1-196所示);若“显示密码”复选框被选中,再重新
在考生文件夹下有一个工程文件sjl3.vbp,相应的窗体文件为sjt3.frm,包含了所有控件和部分程序,如图3-90所示。要求如下:①利用属性窗口向列表框添加四个项目:VisualBasic、TurboC、C++、Java。②请编
(1)在考生文件夹下有一个工程文件sjt3.vbp。窗体上有一个标题为“得分”的框架,在框架中有一个名称为Text1的文本框数组,含六个元素;文本框Text2用来输入难度系数。程序运行时,在左边的六个文本框中输入6个得分,输入难度系数后,单击“计算分数
在考生文件夹下有一个数据库文件“samp2.aecdb”,其中存在已经设计好的3个关联表对象“tStud”、“tCourse”和“tScore”及一个临时表对象“tTmp”。请按以下要求完成设计。(1)创建一个查询,查找并显示照片信息为空的男同学
以下关于窗体的叙述中,错误的是
如果在程序中直接使用了没有声明的变量,则它的数据类型是
InputBox函数返回值的类型为()。
满足下列条件之一的年份是闰年:1)年份能被4整除但不能被100整除2)年份能被400整除若y代表年份,下面判断闰年的正确表达式是( )。
在数据管理技术发展的三个阶段中,数据共享最好的是()。
随机试题
动脉导管未闭患儿临床典型表现为
女性38岁,结婚10年不孕,月经一直不规律,临床考虑为“无排卵型功血”。下列何种辅助检查结果可确定诊断
男,24岁,1年来头晕、乏力、心悸,经常鼻出血、牙龈出血。查体:贫血状,皮肤有瘀点,肝、脾不大。血象:Hb60g/L,网织红细胞0.001,WBC2.8×109/L,PLT38×109/L,骨髓象:增生低下,淋巴细胞比例相对升高,未见巨核细胞,最可能的
某年冬季,男性患者,42岁。因发热、头痛、眼眶痛、腰痛3天来院急诊。自测体温在40~40.6℃之间波动。体格检查:血压70/40mmHg,脉搏110次/分,面部潮红,球结膜充血水肿,软腭有网状充血并有出血点,腋下及胸前见散在出血点,心肺未见异常,双肾区叩击
疏浚工程预算定额中抛泥运距是指()。
冬期拌制混凝土需采用加热原材料时,应优先采用加热()的方法。
车辆购置税是在原交通部门收取的车辆购置附加费的基础上,通过费改税方式演变而来的,主要特点有( )。
下列关于传真机的维护和使用的说法中不合理的是()。
Afour-yearstudybysociologistsatTheUniversityofManchesterhasfoundthatwomenaremuchlikelythanmento【M1】______mak
ThepracticeofpayingchildrenanallowancebecamepopularinAmericaabout100yearsago.Nowadays,Americankidsonaverager
最新回复
(
0
)