问答详情
源自:3-3 Java中的赋值运算符

我这个代码里面 / 没用,应该怎么做呀?求大佬解答

public class HelloWorld{

    public static void main(String[] args) {

    int one = 10 ;

        int two = 20 ;

        int three = 0 ;

        three = one+tow;

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

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

        

    

}

}


提问者:qq_慕慕7443411 2020-09-24 16:38

个回答

  • 陈彩燕
    2020-09-24 20:42:10
    已采纳

    第六行的two,写成tow了。

  • 五八十三
    2020-09-28 10:29:06

    下次记得报报错一起发出来

  • qq_慕慕7443411
    2020-09-25 10:11:30

    谢了,大佬