Last active
December 23, 2015 23:19
-
-
Save ahimmelstoss/6709108 to your computer and use it in GitHub Desktop.
a program that counts the letters in your name, given input. from chris pine's learn to program ch6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "What is your first name?" | |
first_name = gets.chomp | |
puts "What is your middle name?" | |
middle_name = gets.chomp | |
puts "What is your last name?" | |
last_name = gets.chomp | |
puts "Did you know that here are " + (first_name.length + middle_name.length + last_name.length).to_s + " characters" | |
puts "in your name, " + first_name.capitalize + " " + middle_name.capitalize + " " + last_name.capitalize + "?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment