three=one+two;
System.out.println("three= one + two==>"+three);
three += one;
System.out.println("three += one ==>"+three);
three -= one;
System.out.println("three -= one ==>"+three);
three *= one;
System.out.println("three *= one ==>"+three);
three /= one;
System.out.println("three /= one ==>"+three);
three %= one;
System.out.println("three %= one ==>"+three);
}
}
public class HelloWorld{ public static void main(String[] args) { int one = 10 ; int two = 20 ; int three = 0 ; int a = one + two; System.out.println("three = one + two ==>" + a); }}
你这个好像是对的=-=
public class HelloWorld{ public static void main(String[] args) { int one = 10 ; int two = 20 ; int three = 0 ; three=one+two; System.out.println("three= one + two==>"+three); three += one; System.out.println("three += one ==>"+three); three -= one; System.out.println("three -= one ==>"+three); three *= one; System.out.println("three *= one ==>"+three); three /= one; System.out.println("three /= one ==>"+three); three %= one; System.out.println("three %= one ==>"+three); }}
全部代码看看啊,贴这一段咋看啊?