- 9
- 0
- 约1.2万字
- 约 21页
- 2017-02-07 发布于重庆
- 举报
C语言程序设计模拟试题2(附答案)new
《C语言程序设计》模拟试卷二
?
一、填空题。(每空2分,共30分)
1.设有变量说明语句
???? int x=1,y=2;
则执行下述printf语句的输出结果是___1.000000___?? _____。
???? printf(%f\n,1.0+x/y);
2.执行下述程序
???? #include stdio.h
???? main()
???? {
?????? int x,y;
?????? scanf(%2d%*2s%1d,x,y);
?????? printf(%d\n,x+y);
????? }
若从键盘输入
???????
则程序的输出结果是__17______。
3.以下程序的功能是:从键盘上输入若干名学生的成绩(百分制,可带小数,以输入负数或0为结束标志),统计并输出最高成绩和最低成绩。请填空。
??? #include stdio.h
??? main()
??? {
????? float x,amax,amin;
????? scanf(%f,x);
????? amax=x;
????? amin=x;
????? while ( X0X=100 )
????? {
??????? if (xamax)
?????????? amax=x;
??????? else if (xamin)
???????
原创力文档

文档评论(0)