第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

代碼錯誤4

int one = 10 ;
??????? int two = 20 ;
??????? int three = 0 ;
??????? three=one+two;
??????? three+=one;
??????? three-=one;
??????? three*=one;
??????? three/=one;
??????? three%=one;
??????? System.out.println("three=one+two==>"+three);
??????? System.out.println("three+=one==>"+three);
??????? System.out.println("three-=one==>"+three);
??????? System.out.println("three*=oneo==>"+three);
??????? System.out.println("three/=one==>"+three);
??????? System.out.println("three%=one==>"+three);


? 輸出不對? 都是0

正在回答

4 回答

http://img1.sycdn.imooc.com//59021c670001b13206640404.jpg

重新實驗的結果

0 回復 有任何疑惑可以回復我~

? ?int one = 10 ;

? ? ? ? int two = 20 ;

? ? ? ? int three = 0 ;

? ? System.out.println(three=one+two);

? ? System.out.println(three+=one); ? ?

? ? System.out.println(three-=one); ? ?

? ? System.out.println(three*=one); ? ?

? ? System.out.println(three/=one); ? ?

? ? System.out.println(three%=one); ? ?

? ? ? ??

簡單點這樣不就行了,你那個為啥都是0,評論里有個哥們說了啦,那樣寫相當如不斷重復賦值給three(最后一個three%=one;的結果為0),所以你輸出的都是three=0(除開前面帶的字符)

0 回復 有任何疑惑可以回復我~

我建議改為這樣,就會有你想要的結果啦!!!http://img1.sycdn.imooc.com//58f8f255000109f305470376.jpg

0 回復 有任何疑惑可以回復我~

為什么要分開呢 ?不分開 他會用哪個呢


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Java入門第一季(IDEA工具)升級版
  • 參與學習       1167313    人
  • 解答問題       18483    個

0基礎萌新入門第一課,從Java環(huán)境搭建、工具使用、基礎語法開始

進入課程

代碼錯誤4

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號