Created
February 4, 2019 10:22
-
-
Save stevencurtis/a897706963330eefe532ccf96d9f188f to your computer and use it in GitHub Desktop.
Iterative countDown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func countDown(_ num: Int){ | |
if (num < 1) {return} | |
var number = num | |
while number > 0 { | |
print (number) | |
number -= 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment