This commit is contained in:
2026-10-27 16:48:43 +09:00
parent b6af93ba98
commit 6feb026bb4
42 changed files with 449 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
import java.util.Random;
public class Question07_05 {
public static void main(String[] args) {
@@ -6,12 +6,11 @@ public class Question07_05 {
String[] array = {"森", "山", "沼", "島", "平地"};
for(int i = (int) Math.random(); i < array.length; i++) {
System.out.print(array[i]);
}
Random random = new Random();
int num = random.nextInt(5);
System.out.println(array[num]);
}
}

View File

@@ -0,0 +1,14 @@
public class Question07_06 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
String[] array = {"森", "山", "沼", "島", "平地"};
for(int i = array.length-1; i >= 0; i --) {
System.out.print(array[i]);
}
}
}

View File

@@ -0,0 +1,12 @@
public class Question07_07 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
String[]day = {"月","火","水","木","金"};
String[]schedule = {"1時間目","2時間目","3時間目","4時間目","5時間目"};
System.out.println(day[day.ength]);
}
}

View File

@@ -0,0 +1,9 @@
public class Question07_08 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
}
}

View File

@@ -0,0 +1,9 @@
public class Question07_09 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
}
}

View File

@@ -0,0 +1,9 @@
public class Question07_10 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
}
}