A. 1
B. 0
C. -1
D. 不确定
第2题
A.if(x>0)y=1; else if(x= =0)y=0; else y=-1;
B.y=0; if(x>0)y=1; else if(x<0)y=-1;
C.y = 0; if (x> = 0) if (x>0) y = 1; else y = -1;
D.if ( x > = 0) if ( x>0)y = 1; else y = 0; else y = -1;
第3题
A. 1
B. 0
C. -1
D. 不确定
第4题
main()
{
int x,y=-2,z=0:
if((z=y)<0)x=4;
elseif(y==0)x=5;
else x=6;
printf("\t%d\t%d\n",x,z);______。
if(z=(y==0))
x=5;
x=4;
printf("\t%d\t%d\n",x,z);______。
if(x=z=y)x=4:
printf("it%d\t%d\n",x,z);______。
}
第5题
下面程序段所表示的数学函数关系是( )
y=-1
if(x!=0)if(x<0)y=1;else y=0;
第6题
#include <stdio.h>
main()
{ int x=1,y=0;
if(!x) y++;
else if(x==0)
if (x) y+=2;
else y+=3;
printf("%d\n",y);
}
程序运行后的输出结果是
A)3
B)2
C)1
D)0
第8题
#include
main()
{ int x=1,y=0;
if(!x) y++;
else if(x==0)
if (x) y+=2;
else y+=3;
printf("%d\n",y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
第9题
#inclUde<stdio.h>
main()
{int x=1。y=0;
if(!x)y++;
else if(x==0)
if(x)y+=2;
else y+=3; .
printf(“%d\n”,y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
第10题
#inclUde<stdio.h>
main()
{int x=1。y=0;
if(!x)y++;
else if(x==0)
if(x)y+=2;
else y+=3; .
printf(“%d\n”,y);
}
程序运行后的输出结果是
A.3
B.2
C.1
D.0
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!