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

puts"名前を入力してください"
name = gets.chomp
puts"誕生日は?"
puts"何月?"
tuki = gets.to_i
puts"何日"
hiniti = gets.to_i

kekka = "名前は#{name}で誕生日は#{tuki}月#{hiniti}日です"

kekka1 = "\n#{kekka}"

puts"記録を記録します"
file = File.open("rensyuu.txt","a")

file.write(kekka1)
file.close

file = File.open("rensyuu.txt","r")

puts(file.read)
file.close
