- public class Ch04
- {
- public static void main(String args[])
- {
- int x=9846,y=4896,z=9487;
- System.out.println("當x的值為"+x+",y的值為"+y+",z的值為"+z+"時...");
- System.out.println("x+y+z="+(x+y+z));
- System.out.println("x-y-z="+(x-y-z));
- System.out.println("x*y*z="+(x*y*z));
- System.out.println("x/y/z="+(x/y/z));
- System.out.println("x%y%z="+(x%y%z));
- }
- }
複製代碼 |