C语言选择题
设变量已正确定义,以下()与其它switch语句不等价。(2分)A:switch(choice){case1:price=3.0;break;case2:price=2....
设变量已正确定义,以下( )与其它switch语句不等价。 (2分)
A: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break; default: price = 0.0; break;}
B : switch(choice){ default: price = 0.0; break; case 4: price = 3.5; break; case 3: price = 4.0; break; case 2: price = 2.5; break; case 1: price = 3.0; break; }
C: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break;}price = 0.0;
D: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break;} 展开
A: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break; default: price = 0.0; break;}
B : switch(choice){ default: price = 0.0; break; case 4: price = 3.5; break; case 3: price = 4.0; break; case 2: price = 2.5; break; case 1: price = 3.0; break; }
C: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break;}price = 0.0;
D: switch(choice){ case 1: price = 3.0; break; case 2: price = 2.5; break; case 3: price = 4.0; break; case 4: price = 3.5; break;} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询