diff --git a/self_introduction.rb b/self_introduction.rb new file mode 100755 index 0000000..30257a1 --- /dev/null +++ b/self_introduction.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby +# -*- coding: utf-8 -*- + + +print("名前を入力: ") +name = gets.chomp.to_s + +print("好きなもの: ") +like = gets.chomp.to_s + +print("趣味: ") +hobby = gets.chomp.to_s + + +printf("\n私の名前は%sです。\n好きなものは%sで、\n趣味は%sです。\nよろしくおねがいします。", name, like, hobby)