Advertisement
Guest User

Untitled

a guest
Oct 9th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class String
  2. def initial
  3. self [0.3]
  4. end
  5. end
  6.  
  7. loop do
  8. puts "\n enter a string value"
  9. string = gets.chomp
  10. break if string == "exit"
  11. puts "\n enter a non negative integer"
  12. value = gets.chomp
  13. break if string == "exit"
  14.  
  15. puts "your response is: #{string.initial * 3}"
  16. end
  17.  
  18. puts "thank you for using this program – William Woodrum"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement