#!/usr/bin/env ruby #-*-coding:utf-8 -*- arr=[1,2,3,4,5] puts"小さい添字から大きい添字の方へ順番に値を取り出すよ" i=0 while i<=arr.length-1 print arr[i] print" " i+=1 end