mirror of
https://git.tonybark.com/tonytins/swiftlyfox.git
synced 2026-02-10 16:24:48 -05:00
Initial source commit 🎉
This commit is contained in:
commit
8f83d25989
8 changed files with 114 additions and 0 deletions
22
SwiftyFox.playground/Contents.swift
Normal file
22
SwiftyFox.playground/Contents.swift
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import Cocoa
|
||||
|
||||
let interestingNumbers = [
|
||||
"Prime": [2, 3, 5, 7, 11, 13],
|
||||
"Fibonacci": [1, 1, 2, 3, 5, 8],
|
||||
"Square": [1, 4, 9, 16, 25],
|
||||
];
|
||||
|
||||
var largest = 0
|
||||
|
||||
for (_, numbers) in interestingNumbers {
|
||||
for number in numbers {
|
||||
if number > largest {
|
||||
largest = number // 25
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var total = 0
|
||||
for i in 0..<4 {
|
||||
total += i // 6
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue