若a、b、c1、c2、x、y均为整型变量,正确的switch 语句是()。 A.switch(a+b); B.switcha { { case1: y=a+b; break; casec1: y=a-b; break; case0: y=a-b; casec2: x=a*d; break; break; default: x=a+b; } } C.switch(a*a+b*b) D.switch(a-b) {case 3: { default: y=a*b; break; case1: y=a+b; break; case3: x=a+b; break; case3: y=b-a; break; case10: case 11: y=a-b; break; }
|