慕标1475918
2018-09-19 19:45
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 = onr + two==>"+ three);
three+=one;
System.out.println("three += one ==>" + three);
three-=one;
System.out.println("three -= one ==>" + three);
three*=one;
System.out.ptintln("three *= one ==>" + three);
three/=one;
System.out.println("three /= one ==>" + three);
three%=one;
System.out.println("three %= one ==>" + three);
}
}
第7行one写错了,第13行println写错了,细心一点就好啦
System.out.println("three = one + two ==>"+(three=one+two)); System.out.println("three += one ==>"+(three +=one)); System.out.println("three -= one ==>"+(three -=one)); System.out.println("three *= one ==>"+(three *=one)); System.out.println("three %= one ==>"+(three %=one));
还有你的第四个println也写错了呢,细心点哦,加油!
System.out.println("three = onr + two==>"+ three);
你的one写错了吧,改了试试
Java入门第一季(IDEA工具)升级版
1165172 学习 · 17581 问题
相似问题