#!/usr/bin/env ruby # -*- coding: utf-8 -*- kudamono = ["りんご", "みかん", "バナナ"] puts "好きな数字を入れて、値をとり出そう" x = gets.to_i puts kudamono[x]