qq_慕圣9158403
2019-08-07 17:46
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);
}
}
public class HelloWorld{ public static void main(String[] args) { int one = 10 ; int two = 20 ; int three = 0 ; int a = one + two; System.out.println("three = one + two ==>" + a); }}
你这个好像是对的=-=
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= 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); }}
全部代码看看啊,贴这一段咋看啊?
Java入门第一季(IDEA工具)升级版
1165561 学习 · 17587 问题
相似问题