翔9131174
2023-11-13 21:21
public class HelloWorld{
public static void main(String[] args) {
int one = 10 ;
int two = 20 ;
int three = 0 ;
three = one + two;
int age1=one+two;
System.out.println("three=one+two==>"+age1);
three += one;
int age2=three+=one;
System.out.println("three+=one==>"+age2);
three -= one;
int age3=three-=one;
System.out.println("three-=one==>"+age3);
three *= one;
int age4=three*=one;
System.out.println("three*=one==>"+age4);
three /= one;
int age5=three/=one;
System.out.println("three/=one==>"+age5);
three %= one;
int age6=three%=one;
System.out.println("three%=one==>"+age6);
}
}
你所有的System.out.println()中的()用的都是中文(),换成英文的()就对了。
exp{ (String[] args) { one = ; two = ; three = ; three = one + two; age1=one+two; System..println(+age1); three += one; age2=three+=one; System..println(+age2); three -= one; age3=three-=one; System..println(+age3); three *= one; age4=three*=one; System..println(+age4); three /= one; age5=three/=one; System..println(+age5); three %= one; age6=three%=one; System..println(+age6); } }
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题