Files
  • main.swift
main.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
func fizzbuzz(😄: Int) {

	for 💩 in 1...😄 {
		var isDivBy3 = 💩 % 3 == 0
		var isDivBy5 = 💩 % 5 == 0
		
		
		if isDivBy3 && isDivBy5 {
			print("fizzbuzz")
		} else {
			if isDivBy3 {
				print("fizz")
			} else if isDivBy5 {
				print("buzz")
			} else {
				print(💩)
			}
		}
	}
}

fizzbuzz(20)