| ・・・ |
|
|
|
| 017 |
|
public static void main(String[] args) { |
|
| 018 |
|
// TODO code
application logic here |
|
| 019 |
|
|
|
| 020 |
|
//変数 yuushaExpをint型で宣言。950に初期化 |
|
| 021 |
|
int yuushaExp
= 950; |
|
| 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 |
|
|
|
| 045 |
|
//それ以外なら |
|
| 046 |
|
}else{ |
|
|
047 |
|
//レベルアップまでまだまだ!がんばれメッセージを表示 |
|
| 048 |
|
System.out.println("もっとがんばれ! "
+ |
|
| 049 |
|
"経験値:"
+ yuushaExp); |
|
| 050 |
|
} |
|
| 051 |
|
|
|
| 052 |
|
System.out.println("全処理終わり"); |
|
| 053 |
|
} |
|
| 054 |
|
|
|
| ・・・ |
|
|
|