| ・・・ |
|
|
|
| 017 |
|
public static void
main(String[] args) { |
|
| 018 |
|
// TODO code
application logic here |
|
| 019 |
|
|
|
| 020 |
|
//変数 yuushaExpをint型で宣言。750に初期化 |
|
| 021 |
|
int
yuushaExp
= 750; |
|
| 022 |
|
|
|
| 023 |
|
//もしyuushaExpが 1000以上 なら |
|
| 024 |
|
if(yuushaExp
>= 1000){ |
|
| 025 |
|
//レベルアップ!メッセージを表示 |
|
| 026 |
|
System.out.println("レベルアップしました!"); |
|
| 027 |
|
|
|
| 028 |
|
//もしyuushaExpが 900以上 なら |
|
| 029 |
|
}else
if(yuushaExp >= 900){ |
|
| 030 |
|
//あと少し!もう少しメッセージを表示 |
|
| 031 |
|
System.out.println("あともう少し! "
+ |
|
| 032 |
|
"経験値:"
+ yuushaExp); |
|
| 033 |
|
|
|
| 034 |
|
//もしyuushaExpが 700以上 で 800以下 なら |
|
| 035 |
|
}else
if(yuushaExp >= 700 && yuushaExp <= 800){ |
|
| 036 |
|
//特別レベルアップ!メッセージを表示 |
|
| 037 |
|
System.out.println("エクストラレベルアップ!!!"); |
|
| 038 |
|
|
|
| 039 |
|
//もしyuushaExpが 555 か 666 なら |
|
| 040 |
|
}else
if(yuushaExp == 555 || yuushaExp == 666){ |
|
| 041 |
|
//呪いにかかった!レベルダウンメッセージを表示 |
|
| 043 |
|
System.out.println("呪いにかかった!レベルダウン!!"); |
|
| 044 |
|
|
|
| 045 |
|
//それ以外なら |
|
| 046 |
|
}else{ |
|
|
047 |
|
//レベルアップまでまだまだ!がんばれメッセージを表示 |
|
| 048 |
|
System.out.println("もっとがんばれ! "
+ |
|
| 049 |
|
"経験値:"
+ yuushaExp); |
|
| 050 |
|
} |
|
| 051 |
|
} |
|
| 052 |
|
|
|
| ・・・ |
|
|
|