import java.util.Scanner;

public class k19 {
public static void main(String[] args){
Scanner in=new Scanner(System.in);
System.out.println(" \t简单的算数运算器");
System.out.println("-------------------------------");
double result;
String r="符号不合法,无法计算结果";
System.out.println("请输入第一个运算数:");
double num1=in.nextDouble();
System.out.println("请输入第二个运算数:");
double num2=in.nextDouble();
System.out.println("请输入一个运算符【+、-、*、/】:");
char cal=in.next().charAt(0);
if(cal=='+'){
result=num1+num2;
r=String.format("%.2f",result);
}
else if(cal=='-'){
result=num1-num2;
r=String.format("%.2f",result);
}
else if(cal=='*'){
result=num1*num2;
r=String.format("%.2f",result);
}
else if(cal=='/'){
result=num1/num2;
r=String.format("%.2f",result);
}
else{
System.out.println("输入的运算符不正确,请重新输入");
System.out.println("***运算结束***");
}
System.out.println(""+num1+cal+num2+"="+r);
}

}