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

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

6-1項(xiàng)目問(wèn)題,為什么最后可載人,可載貨沒(méi)有輸出

package zuche;

import java.util.Scanner;

public class Text {

public static int money=0;

public static int person=0;

public static int burden=0;

public static String[] r;

public static String[] h;

public static int j=0;

public static int k=0;

public static void main(String[] args) {

Scanner scan=new Scanner(System.in);

? ? ? ? ? ?ab ab=new ab();

? ? ? ? System.out.println("是否進(jìn)入租車系統(tǒng) 1:是;0:否");

? ? ? ? ? ?int x=scan.nextInt();

? ? ? ? ? ?if(ab.ab(x)==1){

Car[] car={new a(),new b(),new c(),new d(),new e(),new f()};

System.out.println("輸入你租車的數(shù)量");

int num=scan.nextInt();

System.out.println("輸入你要租用的天數(shù)");

int day=scan.nextInt();

for(int i=0;i<num;i++){

System.out.print("輸入你第"+(i+1)+"輛所選的車");

String ch=scan.next();

if(ch=="a"){

r[j]="奧迪A4";

j++;

}

if(ch=="b"){

r[j]="馬自達(dá)6";

j++;

}

if(ch=="c"){

r[j]="皮卡雪6";

? ? ? ? h[k]="皮卡雪6";

j++;

k++;

}

if(ch=="d"){

r[j]="金龍";

j++;

}

if(ch=="e"){

h[k]="松花江";

k++;

}

if(ch=="f"){

h[k]="依維柯";

k++;

}

switch (ch){

case "a":money=money+500*day;

? ? ? ? person+=4;

? ? ? ? break;

case "b":money=money+400*day;

? ? person+=4;


? ? break;

case "c":money=money+450*day;

? ? person+=4;

? ? burden+=2;


? ? break;

case "d":money=money+800*day;

? ? person+=20;


? ? break;

case "e":money=money+400*day;

? ? burden+=4;


? ? break;

case "f":money=money+1000*day;

? ? burden+=20;


? ? break;

}

}

System.out.println("可載人的車有");

for(int j1=0;j1<j;j1++){

System.out.println(r[j1]);

}

System.out.println("可載貨的車有");

for(int k1=0;k1<k;k1++){

System.out.println("h[k1]");

}

System.out.println("總載人"+person+"總載貨"+burden);

System.out.println("總價(jià)格為"+money);




}

scan.close();

}

}

http://img1.sycdn.imooc.com//5897f53c000104c801210107.jpg

正在回答

0 回答

代碼沒(méi)有格式化,不好看,把項(xiàng)目打包發(fā)給我吧,我抽空幫你看看,1808570357@qq.com

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

慕粉4401746 提問(wèn)者

非常感謝!
2017-02-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

6-1項(xiàng)目問(wèn)題,為什么最后可載人,可載貨沒(méi)有輸出

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

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

幫助反饋 APP下載

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

公眾號(hào)

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