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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

請(qǐng)問我這樣寫代碼哪里不對(duì)?

public class HelloWorld{

? ? public static void main(String[] args) {

? ?int one = 10 ;

? ? ? ? int two = 20 ;

? ? ? ? int three = 0 ;

? ? ? ? int num1=one+two;

? ? ? ? int num2=three+=one;

? ? ? ? int num3 =three-=one;

? ? ? ? int num4 =three*=one;

? ? ? ? int num5 =three/=one;

? ? ? ? int num6 =three%=one;

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

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

? ? ? ? System.out.println("three = one -= two ==>"+num3);

? ? ? ? System.out.println("three = one *= two ==>"+num4);

? ? ? ? System.out.println("three = one /= two ==>"+num5);?

? ? ? ? System.out.println("three = one %= two ==>"+num6); ? ??

? ? }

}?


正在回答

2 回答

一條語句中不可有兩個(gè)賦值符號(hào)

2 回復(fù) 有任何疑惑可以回復(fù)我~
#1

yeezus_mac 提問者

您是說我定義變量里面的“=”嗎?第一個(gè)是賦值,第二個(gè)是運(yùn)算符啊?
2017-09-26 回復(fù) 有任何疑惑可以回復(fù)我~
#2

慕UI2491424

你后面要打小括號(hào)
2017-11-11 回復(fù) 有任何疑惑可以回復(fù)我~

public class HelloWorld{

? ? public static void main(String[] args) {

? ?int one = 10 ;

? ? ? ? int two = 20 ;

? ? ? ? int three = 0 ;

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

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

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

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

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

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

? ? }

}?


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

yeezus_mac 提問者

我需要輸出是這樣:three = one + two ==>30 three = one += two ==>10 three = one -= two ==>0 three = one *= two ==>0 three = one /= two ==>0 three = one %= two ==>0 我在eclipse上編譯都通過的,不知道為什么在這兒沒有通過
2017-09-26 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

請(qǐng)問我這樣寫代碼哪里不對(duì)?

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)