小弟是java初學者!!
以下程式小弟想計算出兩者總和金額
可是怎跑出來的答案都不是我要的答案>"<
所以想請懂的大大幫我解答ㄧ下!!import java.io.*;
public class if05{
public static void main(String[] args)throws IOException{
BufferedReader buf=new BufferedReader(new InputStreamReader
(System.in));
int x,score;
System.out.print("請輸入您所需要的選項:");
System.out.println("==================================");
System.out.println("選項1:飲料\t"+"選項2:零食\t"+"選項3:香菸\t"+"選項0:無選項");
x=Integer.parseInt(buf.readLine());
System.out.println("請輸入您第二個選項:");
score=Integer.parseInt(buf.readLine());
switch(x){
case 0:
System.out.println("您購買金額為 0元");
break;
case 1:
System.out.println("您購買金額為 25元");
break;
case 2:
System.out.println("您購買金額為 20元");
break;
case 3:
System.out.println("您購買金額為 60元");
break;
default:
System.out.println("無此選項!!!");
}
switch(score){
case 0:
System.out.println("您購買金額為 0元");
break;
case 1:
System.out.println("您購買金額為 25元");
break;
case 2:
System.out.println("您購買金額為 20元");
break;
case 3:
System.out.println("您購買金額為 60元");
break;
default:
System.out.println("無此選項!!!");
}
System.out.println("============================");
System.out.println("您應支付金額為"+ x + score +"元"); //該如何才能計算出應該支付金額?

?寫不出來總和.....到底哪邊要做修改ㄚ???
}
}