Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.52 KB | None | 0 0
  1.  
  2. # x = 0
  3. # 2.times do
  4. #     500.times do
  5. #             x = x + 1
  6. #             print "Vadik  "
  7. #             sleep 0.01
  8. #         end
  9. #     puts x
  10. # end
  11.  
  12. # do
  13. # 10.upto(20) do |x|
  14. #     puts x
  15. # end
  16.  
  17. # do
  18. # 10.downto(20) do |x|
  19. #     puts x
  20. # end
  21.  
  22. 10.times do |x|
  23.     puts "hi"
  24.     x.times do
  25.         print "!"
  26.         end
  27.     end
  28.  
  29.     print "how much in month "
  30.     x = gets.to_f
  31. print "Hom many month "
  32. n = gets.to_i
  33.  
  34. s = 0
  35.  
  36. 1.upto(n) do |m|
  37.     s = s + x
  38.     puts "for month #{m} #{s}"
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement