Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loop do
- puts "\n enter a string value or type exit"
- string = gets.chomp
- break if string == "exit"
- puts "\n enter a non negative integer or type exit"
- value = gets.chomp
- break if string == "exit"
- puts "your response is: #{string[0, 3] * value.to_i}"
- end
- puts "thank you for using this program – William Woodrum"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement