Ruby Examples

This commit is contained in:
2026-01-15 14:01:21 +09:00
commit cf3d7d3296
76 changed files with 1191 additions and 0 deletions

19
level1/06.rb Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
1부터 100까지 출력 (for, while 각각 사용)
=end
for i in 1..100
puts i
end
i = 1
while i <= 100 do
puts i
i += 1
end
(1..100).each { |item| puts item }