Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class B10207081{
- public static void main(String args[]){
- Scanner scn=new Scanner(System.in); //Scanner 宣告
- int a,b,a1;
- //a,b值Input
- System.out.println("請輸入a值");
- a=scn.nextInt();
- a1=a;
- System.out.println("請輸入b值");
- b=scn.nextInt();
- System.out.println("a-=b後 a="+(a-=b));
- a=a1;
- System.out.println("a*=b後 a="+(a*=b));
- a=a1;
- System.out.println("a%=b後 a="+(a%=b));
- a=a1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement