不知道哪里错了?

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

慕沐8443002

2018-11-19 21:00

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


写回答 关注

4回答

  • 慕移动9181930
    2022-03-23 22:12:28
  • 慕勒5139466
    2018-11-26 21:03:58

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

            three+=one;

            System.out.println(three);

            three-=one;

            System.out.println(three);

            three*=one;

            System.out.println(three);

            three/=one;

            System.out.println(three);

            three%=one;

            System.out.println(three);

    }

    }


  • 俊俊田甜
    2018-11-20 11:19:28

    https://img3.mukewang.com/5bf37d2b00013ee106200414.jpg没得分号

  • 慕运维6593739
    2018-11-19 21:35:06

    你没有eclipse.exe?用eclipse.exe编程马上就可以看出哪行有错误 一共错了三行,都是因为分号;

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

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

1165548 学习 · 17586 问题

查看课程

相似问题