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);
}
}
能运行的
能运行的啊!
不用输出
为啥,我能运行。你的运行不了呢?
它要的输出是单独一个变量three,你这样输出是一个字符串"three = one + two ==>"再加一个变量three。