#!/usr/koeki/bin/ruby
# -*- coding: utf-8 -*-
menu = []
price = []
sum = 0
n = 0
i = 0
open("discount.csv","r") do |f|
    while yomikomi = f.gets
         if /(\S+),(\d+)/ =~ yomikomi
            menu[n] = $1.to_s
            price[n] = $2.to_i
            sum += price[n]
            n+=1
        end
    end 
end

if sum >= 1000 && sum<2000
while i < menu.length
    if price[i] <= 100
        puts price
        i+=1
    end
end
end