A.anothernumber
B.anothernumberanother
C.anothernumbernumber
D.numbernumber
第1题
程序运行时,从键盘输入:3<回车>后,程序输出结果为( )。
A、0,1,2,3,4,5,
B、1,2,3,4,
C、0,1,2,
D、3,4,
第2题
#include
int main( )
{
char k;
int i;
for(i=1;i<3;i++)
{
scanf("%c",&k);
switch(k)
{
case '0': printf("another\n");
case '1': printf("number\n");
}
}
return 0;
}
A、another
number
B、another
number
another
C、another
number
number
D、number
number
第3题
main()
{ int a,b;
printf("Enter a,b:"); scanf("%d,%d",&a,&b);
while(a!=b)
{ while(a>b) a -= b;
while(b>a) b -= a;
}
printf("%3d%3d\n",a,b);
}
第4题
main()
{char c;
int v0=1,v1=0,v2=0;
do{switch(c=getchar())
{case ′a′:case ′A′:
case ′e′:case ′E′:
case ′i′:case ′I′:
case ′o′:case ′O′:
case ′u′:case ′U′:v1+=1;
default:v0+=1;v2+=1; }
}while(c!=′\n′);
printf( "v0=%d,v1=%d,v2=%d\n",v0,v1,v2);}
A.v0=7,v1=4,v2=7
B.v0=8,v1=4,v2=8
C.v0=11,v1=4,v2=11
D.v0=13,v1=4,v2=12
第5题
第6题
#include <stdio.h>
main()
{char c;
int v0=1,v1=0,v2=0;
do{ switch(c=getchar())
{ case ′a′:case ′A′:
case ′e′:case ′E′:
case ′i′:case ′I′:
case ′o′:case ′O′:
case ′u′:case ′U′:v1+=1;
default:v0+=1;v2+=1; } }while(c!='\n');
printf("v0=%d,v1=%d,v2=%d\n",v0,v1,v2);}
A.v0=7,v1=4,v2=7
B.v0=8,v1=4,v2=8
C.v0=11,v1=4,v2=11
D.v0=13,v1=4,v2=12
第9题
第10题
A.v0=7,v1=4,v2=7
B.v0=8,v1=4,v2=8
C.v0=11,v1=4,v2=11
D.v0=13,v1=4,v2=12
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!