网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下列程序运行时 , 若输入 labcedf2df< 回车 > 输出结果为【 1 0 】

#include <stdio.h>

main()

{ char a=0,ch;

while((ch=getch ar ())!='\n')

{ if(a%2!=0&&(ch>='a'&&ch<='z')) ch=ch-'a'+'A';

a++; putchar(ch);

}

printf("\n");

}


参考答案

更多 “ 下列程序运行时 , 若输入 labcedf2df 回车 输出结果为【 1 0 】#include stdio.hmain(){ char a=0,ch;while((ch=getch ar ())!='\n'){ if(a%2!=0(ch='a'ch='z')) ch=ch-'a'+'A';a++; putchar(ch);}printf("\n");} ” 相关考题
考题 下列程序运行时,若输入labcedf2df输出结果为【】。 include main(){char a=0,ch; wh 下列程序运行时,若输入labcedf2df<回车>输出结果为【 】。include<stdio.h>main(){ char a=0,ch;while((ch==getchar())!='\n'){ if(a%2!=0(ch>='a'ch<='z')) ch=ch'a'+'A';a++;prtchar(ch);}printf("\n");}

考题 有以下程序:运行时,若输入1 2 3 4 5 0&lt;回车&gt;,则输出结果是( )。A.66656B.6566456C.66666D.6666656

考题 有以下程序:当执行程序时,按下列方式输入数据(从第l列开始,&lt;CR&gt;代表回车,注意:回车也是一个字符]12&lt;CR&gt;34&lt;CR&gt;则输出结果是( )。A.12B.123C.1234D.12343

考题 有以下程序:若运行时输入:2 4 6&lt;回车&gt;,则输出结果为( )。A.2 0 4B.2 0 0C.2 4 0D.2 4 6

考题 有以下程序:执行时输入:aBeDefG&lt;回车&gt;,则输出结果是( )。A.AbCdEFgB.ABCDEFGC.BCDEFGHD.bedefgh

考题 有以下程序:执行时输入:0&lt;回车&gt;后,则输出结果是( )。A.5,B.0,0,0,0,0,C.0,1,2,3,4,D.0,1.

考题 若有以下程序执行时若输入:(其中&lt;Enter&gt;表示回车符)Fig flower is red.&lt;Enter&gt;则输出结果是A.wet is red.Fig Co is blue.B.wet is red.Fig floC.wet is red.The sky is blue.D.Fig flower is red.The sky is blue.

考题 若有以下程序执行时若输入:Fig flower is red.&lt;回车&gt;则输出结果是A.Fig flower is red.is blue.B.Fig flower is red.C.Fig floweris red.D.Fig floweris

考题 有以下程序程序运行时从第一列开始输入:abcdefg&lt;回车&gt;,则输出结果是A.abcdefgB.bcddghC.abcdefgD.bcddgh$

考题 【填空题】下列程序运行时,若输入labced12df<回车> 输出结果为 #include <stdio.h> main() {char a =0,ch; while((ch=getchar())!=’n’) {if(a2!=0(ch>’a’ch<=’z’)) ch=ch-‘a’+’A’; a++;putchar(ch); } printf(“n”); }