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

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

為啥呀我是按著要求寫的為什莫還給我運(yùn)行不了

http://img1.sycdn.imooc.com//5ef434f1000136ff13690794.jpg代碼在idea上也沒報(bào)錯(cuò)呀

正在回答

5 回答

//第一行和第二行代碼互換位置(import引入包要放在java文件的開頭)
import?java.util.Scanner;
public?class?Hello?{
????public?static?void?main(String[]?args)?{
????????
????}
}


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

最后一個(gè)最好,簡(jiǎn)單

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

System.out.println(one%2==0?"one是偶數(shù)":"one是奇數(shù)");

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

public class HelloWorld {

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

int one = 20 ;

int x=one%2;

/*String z=(x==0)?"這是偶數(shù)":"這是奇數(shù)";

System.out.println(z);*/

if(x==0) {System.out.println("這是偶數(shù)");}

if(x==1){System.out.println("這是奇數(shù)");}

? ? ? ??

? ? }

}

emmm? y1s1 456看的不是很明白


0 回復(fù) 有任何疑惑可以回復(fù)我~
//你的代碼不符合題意,應(yīng)該像下面這樣寫
public?class?HelloWorld?{
????public?static?void?main(String[]?args)?{
????????int?one?=?20?;
????????if(one%2==0){
????????????System.out.println(one?+?"是偶數(shù)");
????????}else{
????????????System.out.println(one?+?"不是偶數(shù)");
????????}
????}
}


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

舉報(bào)

0/150
提交
取消

為啥呀我是按著要求寫的為什莫還給我運(yùn)行不了

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

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

幫助反饋 APP下載

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

公眾號(hào)

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