C)y=0;D)y=-1;
if(x>=0)if(x>0)y=1;
if(x>0)y=1;else y=0;
else y=-1;
59、有如下程序
#include
void main()
{float x=5.0,y;
if(x<0.0)y=0.0;
else if(x<10.0)y=1.0/x;
else y=1.0;
printf("%f\n",y);
}
该程序的输出结果是____C_____.
A)0.000000 B)0.50000
C)0.200000 D)1.000000
60、以下程序的执行结果是___B_____.
#include
void main()
{int x=1,y=0;
switch(x)
{
case 1:
switch(y)
{
case 0:printf("first\n");break;
case 1:printf("second\n");break;
}
case 2:printf("third\n");
}
}
A)first B)first
second third
C)first D)second
third
61、以下程序的执行结果是____A____.
#include
void main()
{int a,b,c,d,x;
a=c=0;