若有定义语句int a,b; double x;下列选项中没有错误的是
A)switch(x%2){case0:a++;break;case1:b++;break;default:a++;b++;}B)switch((int)x%2.0){c...
A)switch ( x%2)
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
B)switch ( (int)x%2.0)
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
C)switch ( (int)x%2)
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
A)switch ((int)(x)%2)
{case 0.0 :a++;break;
case 1.0 :b++;break;
default :a++;b++;
} 展开
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
B)switch ( (int)x%2.0)
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
C)switch ( (int)x%2)
{case 0 :a++;break;
case 1 :b++;break;
default :a++;b++;
}
A)switch ((int)(x)%2)
{case 0.0 :a++;break;
case 1.0 :b++;break;
default :a++;b++;
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询