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