源程序: public class Test{ public static void main(String args[]){ int x = 10 ; int y = 3 ; System.out.println(x + " + " + y + " = " +(x + y)) ; System.out.println(x + " - " + y + " = " +(x - y)) ; System.out.println(x + " * " + y + " = " +(x * y)) ; System.out.println(x + " / " + y + " = " +(x / y)) ; System.out.println(x + " % " + y + " = " +(x % y)) ; } } 运行结果: