Skip to content

Commit f977524

Browse files
committed
Day 6
1 parent 85da2a7 commit f977524

File tree

8 files changed

+61
-0
lines changed

8 files changed

+61
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Cocoa
2+
3+
4+
for i in 1...100 {
5+
var output: String = ""
6+
if (i % 3 == 0) {
7+
output += "Fizz"
8+
}
9+
if (i % 5 == 0) {
10+
output += "Buzz"
11+
}
12+
if output == "" {
13+
output = String(i)
14+
}
15+
print(output)
16+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<playground version='5.0' target-platform='macos' buildActiveScheme='true' importAppTypes='true'>
3+
<timeline fileName='timeline.xctimeline'/>
4+
</playground>

checkpoint-3.playground/playground.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

day-6.playground/Contents.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Cocoa
2+
3+
let platforms = ["iOS", "macOS", "tvOS", "watchOS"]
4+
5+
for os in platforms {
6+
print("Swift works great on \(os).")
7+
}
8+
9+
for i in 1...12 {
10+
print(i)
11+
}
12+
13+
14+
print(platforms[1...])
15+
16+
var countdown = 10
17+
18+
while countdown > 0 {
19+
print("\(countdown)")
20+
countdown -= 1
21+
}
22+
23+
print("Blast off!")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<playground version='5.0' target-platform='macos' buildActiveScheme='true' importAppTypes='true'>
3+
<timeline fileName='timeline.xctimeline'/>
4+
</playground>

day-6.playground/playground.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)