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