Persamaan Pemindai Java

System.out.println("Enter the equation");
      double a = sc.nextDouble();
      char b = sc.next().charAt(0);
      double c = sc.nextDouble();
      System.out.println(a);
      System.out.println(b);
      System.out.println(c);
      if (b == '+')
      {
    	  System.out.println(a + c);
      }
yuhang lin