q5-1完了
This commit is contained in:
6
Question05-switch/.classpath
Normal file
6
Question05-switch/.classpath
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
1
Question05-switch/.gitignore
vendored
Normal file
1
Question05-switch/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/bin/
|
||||
17
Question05-switch/.project
Normal file
17
Question05-switch/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Question05-switch</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -21,7 +21,28 @@ public class PTra05_01 {
|
||||
* 変数numの値が 2 の場合 -> あなたの運勢は「中吉」です
|
||||
* 変数numの値が 3 の場合 -> あなたの運勢は「小吉」です
|
||||
* 変数numの値が 4 の場合 -> あなたの運勢は「末吉」です
|
||||
* 変数numの値が 5 の場合 -> あなたの運勢は「凶」です
|
||||
* 変数numの値が 5 の場合 -> あなたの運勢は「末吉」です
|
||||
*/
|
||||
switch(num) {
|
||||
case 0 :
|
||||
System.out.println("あなたの運勢は「大吉」です");
|
||||
break;
|
||||
case 1 :
|
||||
System.out.println("あなたの運勢は「吉」です");
|
||||
break;
|
||||
case 2 :
|
||||
System.out.println("あなたの運勢は「中吉」です");
|
||||
break;
|
||||
case 3 :
|
||||
System.out.println("あなたの運勢は「小吉」です");
|
||||
break;
|
||||
case 4 :
|
||||
System.out.println("あなたの運勢は「末吉」です");
|
||||
break;
|
||||
case 5 :
|
||||
System.out.println("あなたの運勢は「末吉」です");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user