哈哈,是這樣嗎?
public class HelloWorld{
? ? public static void main(String[] args) {
? ? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? System.out.println("three=one+two==>30");
? ? ? ? System.out.println("three+=one==>40");
? ? ? ? System.out.println("three-=one==>30");
? ? ? ? System.out.println("three*=one==>30");
? ? ? ? System.out.println("three/=one==>30");
? ? ? ? System.out.println("three%=one==>30");
? ? ? ??
? ??
}
}
2020-02-18
?你這就直接打印了,至少要有點過程呀
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);
? ? ? ??
? ? ? ??