回答編集履歴
1
method
test
CHANGED
@@ -8,21 +8,29 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
def get_int
|
12
12
|
|
13
|
-
|
13
|
+
loop do
|
14
14
|
|
15
|
+
i = gets
|
16
|
+
|
15
|
-
if
|
17
|
+
if !i.match(/[0-9]+/).nil?
|
18
|
+
|
19
|
+
return i.to_i
|
20
|
+
|
21
|
+
end
|
16
22
|
|
17
23
|
puts "数値以外は入力しないでね。もう一回入力してね。"
|
18
24
|
|
19
|
-
|
25
|
+
end
|
20
26
|
|
21
|
-
|
27
|
+
end
|
22
28
|
|
23
29
|
|
24
30
|
|
31
|
+
loop do
|
32
|
+
|
25
|
-
boobs =
|
33
|
+
boobs = get_int
|
26
34
|
|
27
35
|
|
28
36
|
|