Question04 01

This commit is contained in:
2026-09-11 16:55:17 +09:00
parent 471943fb37
commit 2259a37dac

View File

@@ -1,3 +1,4 @@
/*
* PTra04_01.java
* 作成 Rhizome
@@ -18,6 +19,11 @@ public class PTra04_01 {
while (true) {
// 0~9のランダムな値を生成
randomNumber = random.nextInt(10);
if (randomNumber == 5) {
System.out.println("5が出力されたため処理を終了します");
break;
}
// 生成した値をコンソールに出力
System.out.println(randomNumber);
}