这个程序为啥有误?
程序代码:
import java.util.Scanner; class couculator { public static void main(String[] args) { int num; Scanner a = new Scanner(System.in); System.out.println("请输入第一个数字。"); a = a.nextInt(); Scanner b = new Scanner(System.in); System.out.println("请输入加减乘除符号。(1 = +,2 = -,3 = *,4 = /.)"); b = b.nextInt(); System.out.println("请输入第二个数字。"); Scanner c = new Scanner(System.in); c = c.nextInt(); switch (b) { case 1: num = a + c; break; case 2: if (a < c) { num = a - c; break; } case 3: num = a * c; break; case 4: if (a > c) { num = a / c; break; } } System.out.println(num); } }