Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create an array
- multiples = Array.new
- # create a loop from 0 to 1000
- for current_num in 1...1000 do
- if (current_num % 3 == 0 or current_num % 5 == 0) do
- multiples.push(current_num)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement