#!/usr/bin/env ruby # -*- coding utf-8 -*- print("名前を入力:") name = gets.chomp print("年齢を入力:") nenrei = gets.to_i printf("%sは%d歳です。\n",name,nenrei)