#!/usr/bin/env ruby
# -*- coding:utf-8

kudamono=["","りんご","みかん","バナナ","パイナップル","メロン","ぶどう","グレープフルーツ","オレンジ","さくらんぼ","梨","桃","カキ","デコポン"]
puts("好きな数字を入れて、値を取り出そう")
printf("%s個あります。\n",kudamono.length-1)
x=gets.to_i
if x<kudamono.length&&x>0
  puts(kudamono[x])
else
  puts("ないよ。")
end
