#!/usr/vin/env ruby # -*- coding: utf-8 -*- nedan = [50,100,150,200] i = 0 nedan.each do |n| printf("%dつ目の値段は%d円です。\n",i,n) i += 1 end