赋值运算符
这怎么写啊,有大佬给我示范一下么
这怎么写啊,有大佬给我示范一下么
2021-04-12
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));
举报