• 2022-07-26
    若a和b均是正整型变量,正确的switch语句是______。
    A: switch(pow(a, 2)+pow(b, 2))(注:调用求幂的数学函数){ case 1: case 3: y=a+b; break;ease 0: ease 5: y=a-b;}
    B: switch(a*a+b*b);{ ease 3:ease 1: y=a+b; break;case 0: y=b-a; break;}
    C: switch a{default:x=a+b;case 10: y=a-b; break;case 11: x=a*d; break;}
    D: switch(a+b){ ease10: x=a+b; break;ease11: y=a-b; break;}
  • 举一反三