teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

編集ミスの修正

2016/05/21 22:29

投稿

whereishope...
whereishope...

スコア12

title CHANGED
File without changes
body CHANGED
@@ -25,23 +25,6 @@
25
25
  System.out.print("いくつかな:");
26
26
  x = stdIn.nextInt();
27
27
  if (x > number) {
28
- System.out.println("import java.util.Scanner;
29
- import java.util.Random;
30
-
31
- class Loop3 {
32
- public static void main(String[] args) {
33
- Scanner stdIn = new Scanner(System.in);
34
- Random rand = new Random();
35
- int number = 10 + rand.nextInt(90);
36
-
37
- System.out.println("数当てゲーム開始!!");
38
- System.out.println("10~99の数を当ててください。");
39
- int x;
40
-
41
- do {
42
- System.out.print("いくつかな:");
43
- x = stdIn.nextInt();
44
- if (x > number) {
45
28
  System.out.println("もっと小さな数だよ。");
46
29
  }
47
30
  else if (x < number) {
@@ -51,14 +34,5 @@
51
34
 
52
35
  System.out.println("正解です。");
53
36
  }
54
- }");
55
- }
56
- else if (x < number) {
57
- System.out.println("もっと小さな数だよ。");
58
- }
59
- } while (x != number);
60
-
61
- System.out.println("正解です。");
62
- }
63
37
  }
64
38
  ```