首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
请读程序: # include<stdio.h> main( ) { floa x,y; scanf("%f",& x); if(x<0.0)y=0.0; else if ((x<5.0)& &(x!=2
请读程序: # include<stdio.h> main( ) { floa x,y; scanf("%f",& x); if(x<0.0)y=0.0; else if ((x<5.0)& &(x!=2
admin
2009-04-15
17
问题
请读程序: # include<stdio.h> main( ) { floa x,y; scanf("%f",& x); if(x<0.0)y=0.0; else if ((x<5.0)& &(x!=2.0)) y=1.0/(x+2.0); else if(x<10.0)y=1.0/x; else y=10.0; printf("%f\n",y); } 若运行时从键盘上输入2.0<CR>(<CR>表示回车),则该程序的输出结果是()
选项
A、0
B、0.25
C、0.5
D、1
答案
4
解析
转载请注明原文地址:https://kaotiyun.com/show/L4Xp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
设有下面的语句:PrintIIf(x>0,1,IIf(x
下面程序计算并输出的是()。PrivateSubCommandl_Click()Num=10Sum=0DoSum=Sum+Num*Num*NumNum=Num-1LoopUntilNum<=0PrintSumE
以下合法的VB变量名是( )。
下列叙述中错误的是()。
单击一次命令按钮,下列程序代码的执行结果为()。PrivateSubCommand1_Click()DimaAsIntege,bAsIntege,cAsIntegera=2:b=3:c=4P
设窗体上有名称为Option1的单选按钮,且程序中有语句:IfOption1.Value=TrueThen下面语句中与该语句不等价的是()。
软件按功能可以分为应用软件、系统软件和支撑软件(或工具软件)。下面属于应用软件的是()。
线性表的链式存储结构与顺序存储结构相比,链式存储结构的优点有
用链表表示线性表的优点是
用链表表示线性表的优点是()。
随机试题
A.单纯肋骨骨折B.多发性肋骨骨折胸壁软化C.胸壁挫伤D.闭合性气胸E.张力性气胸紫绀
A.GnRHB.雄激素C.孕激素D.抑制素E.LH
男性,35岁。因鼻塞、流涕3天伴咽痛、咳嗽两天就诊。自服“感冒通”等稍好转。无明显发热、咳痰及胸痛等。查体:T37.3℃,神志清,呼吸平顺,唇甲无发绀,咽稍红,双侧扁桃体无肿大。气管居中,双肺叩诊清音,未闻明显干湿啰音。患者行血常规示:WBC2.8
缺牙间隙多,倒凹大时适合采用平均倒凹法确定就位道。()
从国际上来看,委托指令有效期一般有当日有效与约定日有效两种。()
债券市场的功能主要体现在()。
《六朝那些事儿》一一寻绎魏晋六朝时代人物与事件的原委,但作者显然不是______,而是凭借对中国历史的熟谙,上下古今,议论风生,如指诸掌,加上采用的是比较新潮的语言,诙谐、生动,______,读来真不觉令人忘倦。填入划横线部分最恰当的一项是:
比如你自己,过去未尝不知道莫扎特的特色,但你对他并没有发生真正的共鸣;感之不深,自然爱之不切了;爱之不切,弹出来当然也不够味儿;而越是不够味儿,越是引不起你的兴趣。如此下去,你对一个音乐家的了解当然无从深入。以下哪项,从上述题干中推出最为恰当?
婴儿动作发展的规律以下表述不正确的是()【江西师范大学2014】
设A为3阶矩阵,α1,α2,α3是线性的无关3维列向量组,满足Aα1=α1+2α2+2α3,Aα2=2α1+α2+2α3,Aα3=2α1+2α2+α3.(1)求A的特征值.(2)判断A是否相似于对角矩阵?
最新回复
(
0
)