Skip to content

Commit 8f20ac1

Browse files
authored
Merge pull request #512 from paulsumit1993/gcd-swift4
update gcd implementation to Swift 4 with Xcode 9b4
2 parents b81b5b1 + 679f82a commit 8f20ac1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GCD/GCD.playground/Contents.swift

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//: Playground - noun: a place where people can play
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
// Recursive version
49
func gcd(_ a: Int, _ b: Int) -> Int {
510
let r = a % b

0 commit comments

Comments
 (0)