課程
/后端開發(fā)
/Java
/Java入門第一季(IDEA工具)升級版
請問練習(xí)題代碼怎么寫?沒看懂要求。
2017-07-14
源自:Java入門第一季(IDEA工具)升級版 3-3
正在回答
????????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); ????????//他的意思就是輸出那樣的結(jié)果,上面這是代碼片段
一生一念一人 提問者
非常感謝。
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);
? ? ? ? three %= one;
? ? ? ? System.out.println("three %= one ==> "+three);
????}
}
舉報(bào)
0基礎(chǔ)萌新入門第一課,從Java環(huán)境搭建、工具使用、基礎(chǔ)語法開始
1 回答3-3 JAVA賦值運(yùn)算符
2 回答3―3JAVA中的賦值運(yùn)算符
1 回答Java中賦值運(yùn)算符
3 回答Java中的賦值運(yùn)算符
1 回答Java中的賦值運(yùn)算符
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-07-14
2017-07-14
非常感謝。
2017-07-14
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);
? ? ? ? three %= one;
? ? ? ? System.out.println("three %= one ==> "+three);
????}
}