Files
ruby-examples-1/level1/06.rb
2026-01-15 14:01:21 +09:00

20 lines
219 B
Ruby
Executable File

#!/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 }