質問編集履歴

1

編集ミスの修正

2016/05/21 22:29

投稿

whereishope...
whereishope...

スコア12

test CHANGED
File without changes
test CHANGED
@@ -52,59 +52,7 @@
52
52
 
53
53
  if (x > number) {
54
54
 
55
- System.out.println("import java.util.Scanner;
56
-
57
- import java.util.Random;
58
-
59
-
60
-
61
- class Loop3 {
62
-
63
- public static void main(String[] args) {
64
-
65
- Scanner stdIn = new Scanner(System.in);
66
-
67
- Random rand = new Random();
68
-
69
- int number = 10 + rand.nextInt(90);
70
-
71
-
72
-
73
- System.out.println("数当てゲーム開始!!");
74
-
75
- System.out.println("10~99の数を当ててください。");
76
-
77
- int x;
78
-
79
-
80
-
81
- do {
82
-
83
- System.out.print("いくつかな:");
84
-
85
- x = stdIn.nextInt();
86
-
87
- if (x > number) {
88
-
89
55
  System.out.println("もっと小さな数だよ。");
90
-
91
- }
92
-
93
- else if (x < number) {
94
-
95
- System.out.println("もっと小さな数だよ。");
96
-
97
- }
98
-
99
- } while (x != number);
100
-
101
-
102
-
103
- System.out.println("正解です。");
104
-
105
- }
106
-
107
- }");
108
56
 
109
57
  }
110
58