Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
練習3-6
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextesterpp{ public static void main(String[]args){ System.out.println("【数当てゲーム】"); int ans = new java.util.Random().nextInt(10); for(int i = 0;i <5;i++){ System.out.println("0~9の数字を入力してください"); int num = new java.util.Scanner(System.in).nextInt(); if(num == ans){ System.out.println("アタリ!"); break; }else{ System.out.println("違います。"); } } System.out.println("ゲームを終了します"); } }
run
|
edit
|
history
|
help
0
pow x^n
1a
1
메소드구현하기
nth fibonacci ( memoization )
String Class Methods
tilt
1(E)
JDBC with lambda
Item battle rolyal