幫看看對嗎
{
??? 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);
???
?}
}
2018-09-12
three=one+two;
three%=one;
這兩處的分號你用的中文格式。
2018-09-12
??? public static void main(String[] args) {
???? int one = 10 ;
??????? int two = 20 ;
??????? int three = 0 ;
??? three=one+two;//在此處three的值已經(jīng)是20了
??? System.out.println("three=one+two==>"+three);?
??? three+=one; //three的值變成了30
??? 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);
????
?}
}