这怎么写啊,有大佬给我示范一下么
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);
int one = 10 ;
int two = 20 ;
int three = 0 ;
int a=one+two;
System.out.println("three = one + two==> "+a);
System.out.println("three += one ==> "+(a+=one));
System.out.println("three -= one ==> "+(a-=one));
System.out.println("three *= one ==> "+(a*=one));
System.out.println("three /= one ==> "+(a/=one));
System.out.println("three %= one ==> "+(a%=one));
=,把等号右边的数据赋值给等号左边的变量或常量
+=,a += b,等效于:a = (a的数据类型)(a + (b));
-=,a -= b,等效于:a = (a的数据类型)(a - (b));
=,a = b,等效于:a = (a的数据类型)(a * (b));
/=,a /= b,等效于:a = (a的数据类型)(a / (b));
%=,a %= b,等效于:a = (a的数据类型)(a % (b));