大学C语言练习题Word文档下载推荐.docx

上传人:b****5 文档编号:16127082 上传时间:2022-11-20 格式:DOCX 页数:9 大小:16.25KB
下载 相关 举报
大学C语言练习题Word文档下载推荐.docx_第1页
第1页 / 共9页
大学C语言练习题Word文档下载推荐.docx_第2页
第2页 / 共9页
大学C语言练习题Word文档下载推荐.docx_第3页
第3页 / 共9页
大学C语言练习题Word文档下载推荐.docx_第4页
第4页 / 共9页
大学C语言练习题Word文档下载推荐.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

大学C语言练习题Word文档下载推荐.docx

《大学C语言练习题Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《大学C语言练习题Word文档下载推荐.docx(9页珍藏版)》请在冰豆网上搜索。

大学C语言练习题Word文档下载推荐.docx

ý

¾

Ý

À

Ð

Í

¡

A)Ö

Ü

Ç

1B)Ö

ò

C)Ö

×

Ö

D)¿

É

È

Î

º

Å

charÐ

±

ä

¿

chÊ

ª

´

¸

í

ï

A)¡

¯

<

=ch<

B)(ch>

)&

(ch<

C)(ch>

&

)D)(¡

=ch)AND(¡

>

=ch)

È

ô

Æ

æ

¬

Å

Ù

ú

A)A%2==1B)!

(A%2==0)C)!

(A%2)D)A%2

É

è

Ó

inta=1,b=2,c=3,d=4,m=2,n=2;

(m=a>

b)&

(n=c>

d)º

A)1B)2C)3D)4

Ò

³

á

¹

main()

{inta,b,d=241;

a=d/100%9;

b=(-1)&

(-1);

printf(¡

%d,%d¡

a,b);

}

A)6,1B)2,1C)6,0D)2,0

intx=10,y=20,z=30;

x,y,zµ

if(x>

y)z=x;

x=y;

y=z;

A)x=10,y=20,z=30B)x=20,y=30,z=30

C)x=20,y=30,z=10D)x=20,y=30,z=20

{intm=5;

if(m++>

5)

printf(¡

%d\n¡

m);

else;

m--);

A)4B)5C)6D)7

ø

ë

12£

{intx,y;

scanf(¡

%d¡

&

x);

y=x>

12?

x+10:

x-12;

y);

A)4B)3C)2D)0

¢

c1¡

c2¡

ù

switchÓ

switch(a+b);

switcha

{case1:

y=a+b;

break;

{casec1:

y=a-b;

case0:

casec2:

x=a*d;

default:

x=a+b;

}}

switch(a*a+b*b)D£

switch(a-b)

{case3:

{default:

y=a*b;

case1:

case3:

case3:

y=b-a;

case10:

case11:

}}

10¡

ö

#include¡

stdio.h¡

intmain()

{

inta=15,b=21,m=0;

switch(a%3)

{case0:

m++;

case1:

switch(b%2)

case0:

return0£

1B£

2C£

3D£

4

þ

1.È

100¨

#include<

stdio.h>

intmain()

{inta;

a);

%s¡

(a%2!

=0)?

No¡

:

Yes¡

);

return0;

2.Ð

#include<

{inta=2,b=7,c=5;

switch(a>

0)

{

switch(b<

{case1:

break;

case2:

!

}

switch(c==5)

);

default:

\n¡

return0;

(È

î

1.Ï

Ã

Ø

Ú

x

y

2<

x<

=10

x(x+2)

-1<

=2

1/x

=-1

x-1

intx,y;

scanf(¡

&

if(¡

)y=x*(x+2);

elseif(¡

)y=1/x;

elseif(x<

=-1)y=x-1;

else¡

;

if(y!

=-1)printf(¡

elseprintf(¡

error¡

2.Ò

x,y,zÈ

ê

{intx=4,y=5,z=8;

intu,v;

u=x<

y?

;

v=u<

z?

printf(¡

v);

¦

÷

10½

0.15Ô

0.3Ô

0.4Ô

0.6Ô

0.8Ô

ü

#include¡

intmain()

floatweight,money,rate;

thepaidmoneyoftheclientis:

%f¡

money);

theweightofthewatermelonis:

weight);

rate=0.15;

elseif(weight>

8)

rate=0.3;

6)

4)

rate=0.6;

rate=0.8;

theaccountpayableofthewatermelonis%f\n¡

weight*rate);

thechangeforclientis%f\n¡

money-weight*rate);

}

floatx,y;

charoperator;

pleaseinputtheexpression:

%f%c%f¡

x,&

operator,&

y);

switch(¡

{case¡

%g%c%g=%g\n¡

x,operator,y,x+y);

case¡

x,operator,y,x-y);

x,operator,y,x*y);

if(y==0.0)

else

x,operator,y,x/y);

1.±

a2+b2´

100£

a2+b2°

2.±

yes£

no¡

------------------

cool

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 其它

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1