Advertisement
Guest User

Untitled

a guest
May 26th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. func euler001() -> Int {
  2. var total = 0
  3. for num in 0..<1000 {
  4. if num % 3 == 0 || num % 5 == 0 {
  5. total += num
  6. }
  7. }
  8. return total
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement