1、
String P="+",M="-",MU="*",D="/";
double result=0;
char cc=c.charAt(0);
if(cc.equals(P)){
result=a+b;
System.out.println("The result for "+a+c+b+" is "+result);
}
你cc是char,而P是String.所以把 char cc=c.charAt(0);换成:String cc=c.substring(0,1);
2.double discount=Integer.parseDouble(discountinpercent);
把Integer换成:Double