题目内容 (请给出正确答案)
[主观题]

有如下程序 #include <stdio.h> int main(void) { float x=2.0,y; if(x<0.0) y="0.0;"

有如下程序 #include <stdio.h> int main(void) { float x=2.0,y; if(x<0.0) y="0.0;" else printf("%f\n",y); return 0; } 该程序的输出结果是()。> A、1.000000

B、0.250000

C、0.500000

D、0.000000

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“有如下程序 #include <stdio.h> int m…”相关的问题

第1题

以下程序的输出是( ) #include <stdio.h> int main() { float x=2.0,y; if (x<0.0) y="0.0;" else if printf("%f\n", y); }> A、0.000000

B、0.250000

C、0.500000

D、1.000000

点击查看答案

第2题

#include <stdio.h> main( ) { int x=5;float y=2; printf("%d \n", x/y); }

A、2

B、2.5

C、2.5000

D、1

点击查看答案

第3题

#include <stdio.h> int main( ) { int x=345; float y=1.823; printf(“%-5d,%5.2f”,x,y); } 程序的运行结果为:
点击查看答案

第4题

分析下列程序的运行结果。 #include <stdio.h> void main() { float x,y; x=12345678900000
分析下列程序的运行结果。 #include <stdio.h> void main() { float x,y; x=1234567890000000000.0; y=x+0.12345; printf(“x=%f,y=%f\n”,x,y); x=3.1415926; y=x=0.0001; printf(“x=%.3f,y=%.3f\n”,x,y); Y=x+0.0000005; printf(“x=%.7f,y=%.7f\n”,x,y); }

点击查看答案

第5题

请阅读以下程序: #include<stdio. h> void main() { float a,b scanf("%f",&a); if (a<10.0) b="1.0/x;" else 1.0 (a+2.0); ; printf("%f\n",y); }> A、0.000000

B、0.500000

C、1. 000000

D、0.250000

点击查看答案

第6题

#include<stdio.h> int main( ) { scanf("%3d%f",&x,&y); int x; float y; printf(“%d,%f\n”,x,y); return 0; } 该段代码编译没有错误,可正常运行。
点击查看答案

第7题

#include <stdio.h> main() { int a=2,b=3; float x=3.9,y=2.3; float r; r=(float)(a+b)/.2+(int)x%(int)y; printf("%f\n",r); } 程序的运行结果为 。
点击查看答案

第8题

若有以下程序: `#include <stdio.h> void fun (float *a,float *b) { float w; *a = *a+ *
a; w=*a; *a=*b; *b=w; } main() { float x=2.0 , y=3.0, *px=&x,*py=&y; fun (px,py); printf(“%2.0f,%2.0f\n”,x,y); } 程序的输出结果是________

A、3,4

B、4,3

C、2,3

D、3,2

点击查看答案

第9题

以下程序的运行结果是 #include <stdio.h> int main() { int a = 12, b = 3; float x = 18.5, y = 4.5; printf("%f\n", (float)(a * b) / 2); printf("%d\n", (int)x %(int)y); return 0; }

A、18.000000 2

B、18 2

C、18 2.000000

D、18.000000 2.000000

点击查看答案

第10题

求下列分段函数的值,正确的程序有()。 [图]A、#include ...

求下列分段函数的值,正确的程序有()。

A、#include <stdio.h> #include <math.h> int main( ) { float x,y; scanf("%f",&x); if (x<10) y="3-fabs(x);" else printf("y="%f\n&quot;,y);" return 0;> B、#include <stdio.h> #include <math.h> int main( ) { float x,y; scanf("%f",&x); if (x<10) y="3-fabs(x);" if (x>=10) y=sqrt(x)-2; printf("y=%f\n",y); return 0; }

C、#include <stdio.h> #include <math.h> int main( ) { float x,y; scanf("%f",&x); if (x<10) y="3-fabs(x);" else if (x>=10) y=sqrt(x)-2; printf("y=%f\n",y); return 0; }

D、#include <stdio.h> #include <math.h> int main( ) { float x,y; scanf("%f",&x); y=3-fabs(x); if (x>=10) y=sqrt(x)-2; printf("y=%f\n",y); return 0; }

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信