1037: 四则运算
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);double s1,s2,result;String op;s1=cin.nextDouble();op=cin.next();s2=cin.nextDouble();if(op.equals("+"))result=s1+s2;else if(op.equals("-"))result=s1-s2;else if(op.equals("*"))result=s1*s2;else if(op.equals("/")){
if(Math.abs(s2)<1e-10){
System.out.println("Wrong input!");return;}else result=s1/s2;}else{
System.out.println("Wrong input!");return;}System.out.printf("%.2f",result);}
}