哈哈,是这样吗?

来源:3-3 Java中的赋值运算符

qq_慕莱坞5169342

2020-02-18 01:28

public class HelloWorld{

    public static void main(String[] args) {

    int one = 10 ;

        int two = 20 ;

        int three = 0 ;

        System.out.println("three=one+two==>30");

        System.out.println("three+=one==>40");

        System.out.println("three-=one==>30");

        System.out.println("three*=one==>30");

        System.out.println("three/=one==>30");

        System.out.println("three%=one==>30");

        

    

}

}


写回答 关注

1回答

  • 慕少8509374
    2020-02-18 10:31:00

    ?你这就直接打印了,至少要有点过程呀

    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);

            

            


    qq_慕莱坞...

    哈哈,好的谢谢哈

    2020-02-18 13:20:26

    共 1 条回复 >

Java入门第一季(IDEA工具)升级版

0基础萌新入门第一课,从Java环境搭建、工具使用、基础语法开始

1165172 学习 · 17581 问题

查看课程

相似问题