ÄÚÈÝ·¢²¼¸üÐÂʱ¼ä : 2024/12/22 12:16:35ÐÇÆÚÒ» ÏÂÃæÊÇÎÄÕµÄÈ«²¿ÄÚÈÝÇëÈÏÕæÔĶÁ¡£
switch(x) {casel£º
switch(y)
{case0:a++;break;
case1£ºb++£»break£»} case2£º a++£»b++;break£»} printf(\£¥d,b=£¥d\\n\£¬a£¬b)£»} ÉÏÃæ³ÌÐòµÄÊä³ö½á¹ûÊÇ A)a=2£¬b=lB)a=l£¬b=lC)a=l£¬b=0D)a=2£¬b=2 10£®ÈôÒªÇó±íʾa²»µÈÓÚ0µÄ¹Øϵ£¬´íÎóµÄ±í´ïʽÊÇ A)a<>0B)a!=0 C)aD)a<0||a>0 11.³ÌÐòµÄÈýÖÖ»ù±¾½á¹¹ÊÇ¡£ A)˳Ðò½á¹¹£¬Ñ»·½á¹¹£¬µÝ¹é½á¹¹B)˳Ðò½á¹¹£¬Ñ»·½á¹¹£¬Ñ¡Ôñ½á¹¹ C)Ñ¡Ôñ½á¹¹£¬Ñ»·½á¹¹£¬µÝ¹é½á¹¹D)˳Ðò½á¹¹£¬Ñ¡Ôñ½á¹¹£¬µÝ¹é½á¹¹ 12.CÓïÑÔÖУ¬Âß¼Õæ±íʾΪ A)TRUEB)'y'»ò'Y'C)1D)·ÇÁãÖµ 13£®ÉèÓÐÈçϳÌÐò£º
#include
13
scanf(¡°%c%c¡±,&ch1,&ch2); if(ch1!=¡¯B¡¯) {switch(ch2) {case¡¯B¡¯: switch(ch1)
{case¡¯A¡¯:printf(¡°AB¡±) break; case¡¯B¡¯:printf(¡°BB¡±); break;} case¡®A¡¯: switch(ch1) 14
{case¡¯A¡¯:printf(¡°AA¡±) break; case¡¯B¡¯:printf(¡°BA¡±); break; }}}}} ÈôÖ´ÐÐÊÇ´Ó¼üÅÌÉÏÊäÈëµÄÊý¾ÝʱAB£¬ÔòÊä³öÊÇ A)ABB)ABAAC)ABBBAABAD)BBBA 14.ÒÑÖªa,b,c,wʱintÐͱäÁ¿£¬a,b¾ùÒÔ¸³Öµ£¬ÇÒÂú×ãa
if(w<=b)w=b;
if(w<=c)printf(¡°%d¡±,w); elsew=c;
Ϊ°ÑcµÄÖµ·ÅÈëwÖУ¬ÔòÖ´Ðд˳ÌÐò¶Îʱ£¬´Ó¼üÅÌÊäÈëµÄcµÄÖµ²»Ó¦È¡µÄ·¶Î§ÊÇ
A)b>cB)c>=bC)c>aÇÒc 15.Éèa£¬b£¬wΪÕûÐͱäÁ¿£¬chΪ×Ö·ûÐͱäÁ¿£¬ÓÃifÓï¾ä¸ÄдÒÔϵijÌÐò¶Î£º switch(ch) {case'+'£ºw=a+b£»break£» case'-'£ºw=a-b£»break£» case'*'£ºw=a*b£»break£» case'/'£ºw=a/b£»break£»} ÔÚÏÂÁÐд·¨ÖУ¬´íÎóµÄÊÇ A)if(ch=='+')w=a+b£»B)if(ch=='*')w=a*b£» if(ch=='-')w=a-b£»elseif(ch=='/')w=a/b£» if(ch=='*')w=a*b£»if(ch=='+')w=a+b£» if(ch=='/')w=a/b£»elseif(ch=='-')w=a-b£» C)if(ch=='+')w=a+b£»D)if(ch=='+')w=a+b£» elseif(ch=='-')w=a-b£»elseif(ch=='-')w=a-b£» if(ch=='*')w=a*b£»if(ch=='*')w=a*b£» elsew=a/b£»elseif(ch=='/')w=a/b£» 16.ʵÐͱäÁ¿a£¬bÖзÅÓÐÁ½Ãſγ̵Ŀ¼ÊԳɼ¨£¬Èç¹ûÁ½Ãųɼ¨¶¼¼°¸ñ(³É¼¨>=60)£¬ÔòÏÔʾ¡°pass¡±£¬Èç¹ûa³É¼¨²»¼°¸ñ£¬ÔòÏÔʾ 15 \£¬Èç¹ûa³É¼¨¼°¸ñ¶øb³É¼¨²»¼°¸ñÔò²»×öÈκδ¦Àí¡£ÏÂÁгÌÐò¶ÎÖпÉʵÏÖÉÏÊöÒªÇóµÄÊÇ A)if(a>=60)B)if(a<60) if(b>=60)printf(¡±fail¡±)£» printf(\£»elseif(b>=60) elseprintf(\£» printf(\£» C)if(a>=60)&&(b>=60))D)if(b>=60) printf(\£»if(a>=60) elseif(b<60)printf(\£» printf(\£»elseprintf(\£» 16 17.ÏÂÃæÂú×ãµ±(a>=b)&&(c==d)ʱu=w£¬·ñÔòx=yµÄifÓï¾äÊÇ A)if(a=b) {if(c==d)x=y£»{if(c==d)x=y£» elseu=w£»elseu=w£» }} 18.ÒÔϳÌÐòµÄÊä³ö½á¹ûÊÇ #include