Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.58 KB | None | 0 0
  1. x = 0
  2. y = 0
  3. z = 0
  4. cap = 10
  5.  
  6. #puts ""
  7. #puts "Time for 3's"
  8. #puts ""
  9. #if x == 10
  10. #   z = x - 3
  11. #end
  12. #while x > 10
  13. #   z = x - 3
  14. #   puts "To high: #{x}"
  15. #end
  16. #while x < 10
  17. #   puts x
  18. #   x = x + 3
  19. #   puts "x = #{x}"
  20. #   z = x + 3
  21. #   puts "z = #{z}"
  22. #end
  23. y = z + 3
  24.  
  25. a = 0
  26. b = 0
  27.  
  28. puts ""
  29. puts "Time for 5's"
  30. puts ""
  31.  
  32.  
  33. while a or b >= cap
  34. #   puts "To high: #{a}"
  35.     puts a
  36.    
  37. end
  38. if b >= cap
  39.     b = b -5
  40. end
  41.  
  42. while a < cap
  43.     a = a + 5
  44.     puts "a = #{a}"
  45.     b = a + 5
  46.     puts "b = #{b}"
  47. end
  48.  
  49. #d = z + b
  50.  
  51. puts ""
  52. puts ""
  53. #puts y
  54. puts b
  55. puts "The Final anwser is: #{b}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement