Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 282 Bytes
for i in 1...100 {
guard let message: String =
((i % 3 == 0) && (i % 5 == 0)) ? "FizzBuzz" :
(i % 3 == 0) ? "Fizz" :
(i % 5 == 0) ? "Buzz" : nil else {
print(i)
continue
}
print(message)
}
You can’t perform that action at this time.