This commit is contained in:
m-mun
2026-09-09 08:34:32 +09:00
parent 8e67b4ccb9
commit 1b863df929
181 changed files with 34869 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
/*
* PTra06_01.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_01 {
public static void main(String[] args) {
// TODO for文を使って0から99までの整数を順にコンソールに出力してください。
}
}

View File

@@ -0,0 +1,16 @@
/*
* PTra06_02.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_02 {
public static void main(String[] args) {
// TODO for文を使って以下の出力結果が出るようなプログラムを作成してください。
/*
* ■■■■■
*/
}
}

View File

@@ -0,0 +1,18 @@
/*
* PTra06_03.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_03 {
public static void main(String[] args) {
// iが0から100になるまで繰り返しを行います
for (int i = 0; i <= 100; i++) {
// TODO iが偶数の時だけ、iの値を出力してください
}
}
}

View File

@@ -0,0 +1,21 @@
/*
* PTra06_04.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_04 {
public static void main(String[] args) {
// TODO 下記のfor文の中で、変数iの値を条件に以下のような挙動をするプログラムを作成してください。
/*
* ① iが3で割り切れる場合はfizzと出力する
* ② iが5で割り切れる場合はbuzzと出力する
* ③ iが3でも5でも割り切れる場合はfizzbuzzと出力する
* ④ 上記のいずれにも当てはまらない場合はiの値をそのまま出力する
*/
for(int i = 1;i < 50;i++) {
}
}
}

View File

@@ -0,0 +1,26 @@
/*
* PTra06_05.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
import java.util.Random;
public class PTra06_05 {
public static void main(String[] args) {
// 乱数生成処理
Random random = new Random();
// 乱数を格納するための変数を初期化
int randomNumber = 0;
// 以下のfor文は0~2のランダムな値を10回出力します。
// TODO 値が2の場合は出力しないようにしてください。
// ※ continueを用いてください。
for(int i = 0;i < 10;i++) {
randomNumber = random.nextInt(3);
System.out.println(randomNumber);
}
}
}

View File

@@ -0,0 +1,20 @@
/*
* PTra06_06.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_06 {
public static void main(String[] args) {
// TODO for文を使って以下の出力結果が出るようなプログラムを作成してください。
/*
* ■■■■■
* ■■■■■
* ■■■■■
* ■■■■■
* ■■■■■
*/
}
}

View File

@@ -0,0 +1,25 @@
/*
* PTra06_07.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra06_07 {
public static void main(String[] args) {
/*
* TODO 以下のかけ算九九の出力結果が出るようなプログラムを作成してください。
*
* 1 2 3 4 5 6 7 8 9
* 2 4 6 8 10 12 14 16 18
* 3 6 9 12 15 18 21 24 27
* 4 8 12 16 20 24 28 32 36
* 5 10 15 20 25 30 35 40 45
* 6 12 18 24 30 36 42 48 54
* 7 14 21 28 35 42 49 56 63
* 8 16 24 32 40 48 56 64 72
* 9 18 27 36 45 54 63 72 81
*/
}
}