Guest User

Untitled

a guest
May 20th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. # Find the sum of all the multiples of 3 or 5 below 1000.
  2.  
  3. cap = 1000
  4.  
  5. threes = 3
  6. fives = 5
  7.  
  8. while threes < 1000
  9. threes + 3
  10. puts threes
  11. end
  12.  
  13. while fives < 1000
  14. fives + 5
  15. puts fives
  16. end
Add Comment
Please, Sign In to add comment