新建
上传
首页
助手
最?/div>
资料?/div>
工具

?/p>

C

语言程序设计》模拟试卷二

 

 

 

一、填空题。(每空

2

分,?/p>

30

分)

 

 

1.

设有变量说明语句

 

 

 

 

 

 int x=1,y=2;

 

则执行下?/p>

printf

语句的输出结果是

___1.000000___ 

 

 _____

?/p>

 

 

 

 

 

 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);

 

 

 

 

 

 

 }

 

若从键盘输入

 

 

 

 

 

 

 

 

 12345671 

 

则程序的输出结果?/p>

__17______

?/p>

 

3.

以下程序的功能是:从键盘上输入若干名学生的成?/p>

(

百分制,可带小数,以输入负数?/p>

0

?/p>

结束标志

)

,统计并输出最高成绩和最低成绩。请填空?/p>

 

 

 

 

 #include <stdio.h>

 

 

 

 

 main()

 

 

 

 

 {

 

 

 

 

 

 

 float x,amax,amin;

 

 

 

 

 

 

 scanf("%f",&x);

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 while (    X>0&&X<=100        )

 

 

 

 

 

 

 {

 

 

 

 

 

 

 

 

 if (x>amax)

 

 

 

 

 

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 

 

 else if (x<amin)

 

 

 

 

 

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 

 

 

scanf("%f?/p>

,&x);

 

 

 

 

 

 

 

 }

 

 

 

 

 

 

 

 printf("\namax=%f\namin=%f\n",amax,amin);

 

Ͼλ
新建
上传
首页
助手
最?/div>
资料?/div>
工具

?/p>

C

语言程序设计》模拟试卷二

 

 

 

一、填空题。(每空

2

分,?/p>

30

分)

 

 

1.

设有变量说明语句

 

 

 

 

 

 int x=1,y=2;

 

则执行下?/p>

printf

语句的输出结果是

___1.000000___ 

 

 _____

?/p>

 

 

 

 

 

 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);

 

 

 

 

 

 

 }

 

若从键盘输入

 

 

 

 

 

 

 

 

 12345671 

 

则程序的输出结果?/p>

__17______

?/p>

 

3.

以下程序的功能是:从键盘上输入若干名学生的成?/p>

(

百分制,可带小数,以输入负数?/p>

0

?/p>

结束标志

)

,统计并输出最高成绩和最低成绩。请填空?/p>

 

 

 

 

 #include <stdio.h>

 

 

 

 

 main()

 

 

 

 

 {

 

 

 

 

 

 

 float x,amax,amin;

 

 

 

 

 

 

 scanf("%f",&x);

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 while (    X>0&&X<=100        )

 

 

 

 

 

 

 {

 

 

 

 

 

 

 

 

 if (x>amax)

 

 

 

 

 

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 

 

 else if (x<amin)

 

 

 

 

 

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 

 

 

scanf("%f?/p>

,&x);

 

 

 

 

 

 

 

 }

 

 

 

 

 

 

 

 printf("\namax=%f\namin=%f\n",amax,amin);

 

">
新建
上传
首页
助手
最?/div>
资料?/div>
工具

?/p>

C

语言程序设计》模拟试卷二

 

 

 

一、填空题。(每空

2

分,?/p>

30

分)

 

 

1.

设有变量说明语句

 

 

 

 

 

 int x=1,y=2;

 

则执行下?/p>

printf

语句的输出结果是

___1.000000___ 

 

 _____

?/p>

 

 

 

 

 

 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);

 

 

 

 

 

 

 }

 

若从键盘输入

 

 

 

 

 

 

 

 

 12345671 

 

则程序的输出结果?/p>

__17______

?/p>

 

3.

以下程序的功能是:从键盘上输入若干名学生的成?/p>

(

百分制,可带小数,以输入负数?/p>

0

?/p>

结束标志

)

,统计并输出最高成绩和最低成绩。请填空?/p>

 

 

 

 

 #include <stdio.h>

 

 

 

 

 main()

 

 

 

 

 {

 

 

 

 

 

 

 float x,amax,amin;

 

 

 

 

 

 

 scanf("%f",&x);

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 while (    X>0&&X<=100        )

 

 

 

 

 

 

 {

 

 

 

 

 

 

 

 

 if (x>amax)

 

 

 

 

 

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 

 

 else if (x<amin)

 

 

 

 

 

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 

 

 

scanf("%f?/p>

,&x);

 

 

 

 

 

 

 

 }

 

 

 

 

 

 

 

 printf("\namax=%f\namin=%f\n",amax,amin);

 

Ͼλ">
Ͼλ
Ŀ

C语言程序设计模拟试题2(附答?new - 百度文库
新建
上传
首页
助手
最?/div>
资料?/div>
工具

?/p>

C

语言程序设计》模拟试卷二

 

 

 

一、填空题。(每空

2

分,?/p>

30

分)

 

 

1.

设有变量说明语句

 

 

 

 

 

 int x=1,y=2;

 

则执行下?/p>

printf

语句的输出结果是

___1.000000___ 

 

 _____

?/p>

 

 

 

 

 

 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);

 

 

 

 

 

 

 }

 

若从键盘输入

 

 

 

 

 

 

 

 

 12345671 

 

则程序的输出结果?/p>

__17______

?/p>

 

3.

以下程序的功能是:从键盘上输入若干名学生的成?/p>

(

百分制,可带小数,以输入负数?/p>

0

?/p>

结束标志

)

,统计并输出最高成绩和最低成绩。请填空?/p>

 

 

 

 

 #include <stdio.h>

 

 

 

 

 main()

 

 

 

 

 {

 

 

 

 

 

 

 float x,amax,amin;

 

 

 

 

 

 

 scanf("%f",&x);

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 while (    X>0&&X<=100        )

 

 

 

 

 

 

 {

 

 

 

 

 

 

 

 

 if (x>amax)

 

 

 

 

 

 

 

 

 

 

 

 amax=x;

 

 

 

 

 

 

 

 

 else if (x<amin)

 

 

 

 

 

 

 

 

 

 

 

 amin=x;

 

 

 

 

 

 

 

 

 

scanf("%f?/p>

,&x);

 

 

 

 

 

 

 

 }

 

 

 

 

 

 

 

 printf("\namax=%f\namin=%f\n",amax,amin);

 



ļ׺.doc޸Ϊ.docĶ

  • VASP4.6㾧ܴʵ
  • װ1-4¸ϰ
  • ̸Ӽ¼Ƭ½ṹ
  • LDPC
  • 2019ֽṹ״оչǰƱ Ŀ¼
  • ACFUNʽԱ(ȫ)
  • 2015ũ翼
  • ִ۵ϰο
  • 824úרͻ(ո)
  • 2018-2019꺼Сѧģ(10)ϸ

վ

԰ Ͼλ
ϵͷ779662525#qq.com(#滻Ϊ@)