Files
  • main.rb
main.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#This program will take the name you input and spell it and as well as tell you how many letters are in your name.

puts "Please enter your name"
name = gets.chomp

def printChars(name)
  name.each_char { |c|
      puts c
  }
end

puts "This is how to spell your name"
printChars(name)
puts "You have #{name.length} letters in your name."
puts "I love you <3"
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]