你好,swich这一段,乘法后忘记加break了。改为:switch(c){case'+':result=a+b;break;case'-':result=a-b;break;case'*':result=a*b;break;case'/':result=a/b;break;}谢谢采纳