This commit is contained in:
2026-09-11 14:44:53 +09:00
parent 5677614011
commit 43b7f458f3
5 changed files with 35 additions and 3 deletions

View File

@@ -17,6 +17,9 @@ public class PTra04_01 {
// TODO while文の条件を修正して5が出力されたら繰り返しを止めるようにしてください。
while(true) {
// 0~9のランダムな値を生成
if (randomNumber==5) {
break;
}
randomNumber = random.nextInt(10);
// 生成した値をコンソールに出力
System.out.println(randomNumber);