#!/usr/bin/env ruby
def print_hash(hash)
hash.each {|key, value| printf("%-20s %20s\n", key, value) }
end
info = {}
print "First Name: "
info["First Name"] = gets.chomp
print "Last Name: "
info["Last Name"] = gets.chomp
if info["Last Name"] == ''
info["Last Name"] = info["First Name"]
print "Employee Number: "
info["Employee Number"] = gets.chomp
print "Name on Badge: "
info["Name on Badge"] = gets.chomp
case info["Name on Badge"]
when "f"
info["Name on Badge"] = info["First Name"]
when "fl"
info["Name on Badge"] = info["First Name"] + " " + info["Last Name"]
print_hash(info)
IyEvdXNyL2Jpbi9lbnYgcnVieQoKZGVmIHByaW50X2hhc2goaGFzaCkKICBoYXNoLmVhY2gge3xrZXksIHZhbHVlfCBwcmludGYoIiUtMjBzICUyMHNcbiIsIGtleSwgdmFsdWUpIH0KZW5kCgppbmZvID0ge30KcHJpbnQgIkZpcnN0IE5hbWU6ICIKaW5mb1siRmlyc3QgTmFtZSJdID0gZ2V0cy5jaG9tcApwcmludCAiTGFzdCBOYW1lOiAiCmluZm9bIkxhc3QgTmFtZSJdID0gZ2V0cy5jaG9tcAppZiBpbmZvWyJMYXN0IE5hbWUiXSA9PSAnJwogIGluZm9bIkxhc3QgTmFtZSJdID0gaW5mb1siRmlyc3QgTmFtZSJdCnByaW50ICJFbXBsb3llZSBOdW1iZXI6ICIKaW5mb1siRW1wbG95ZWUgTnVtYmVyIl0gPSBnZXRzLmNob21wCnByaW50ICJOYW1lIG9uIEJhZGdlOiAiCmluZm9bIk5hbWUgb24gQmFkZ2UiXSA9IGdldHMuY2hvbXAKY2FzZSBpbmZvWyJOYW1lIG9uIEJhZGdlIl0KICB3aGVuICJmIgogICAgaW5mb1siTmFtZSBvbiBCYWRnZSJdID0gaW5mb1siRmlyc3QgTmFtZSJdCiAgd2hlbiAiZmwiCiAgICBpbmZvWyJOYW1lIG9uIEJhZGdlIl0gPSBpbmZvWyJGaXJzdCBOYW1lIl0gKyAiICIgKyBpbmZvWyJMYXN0IE5hbWUiXQpwcmludF9oYXNoKGluZm8p