Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print "Give me a four letter word:"
- fourword = gets.chomp
- if fourword == nil
- print "You need to give me some input first."
- elsif fourword.length == 4
- print "Well done. '#{fourword}' appears to be 4 characters long."
- elsif fourword =! nil and fourword.length < 4
- print "#{fourword} has too few characters."
- elsif fourword.length > 5
- print "#{fourword} has too many characters."
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement