質問編集履歴
1
訂正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rubyで
|
1
|
+
rubyでループするときには
|
test
CHANGED
@@ -1,29 +1,11 @@
|
|
1
|
-
|
1
|
+
```Ruby
|
2
2
|
|
3
|
+
istream::int_type ch;
|
3
4
|
|
5
|
+
while((ch = cin.get()) != EOF){
|
4
6
|
|
7
|
+
//処理
|
5
8
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
|
11
|
-
while str=STDIN.gets
|
12
|
-
|
13
|
-
p str.chomp
|
14
|
-
|
15
|
-
open("note.txt", "a") do |f|
|
16
|
-
|
17
|
-
f.puts(str)
|
18
|
-
|
19
|
-
if str == '\r\n'
|
20
|
-
|
21
|
-
break
|
22
|
-
|
23
|
-
|
9
|
+
}
|
24
|
-
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
10
|
|
29
11
|
```
|