Skip to content

Instantly share code, notes, and snippets.

@T-Pham
Created February 27, 2020 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save T-Pham/2c14c38cce2cd24eacc83e59558df739 to your computer and use it in GitHub Desktop.
Save T-Pham/2c14c38cce2cd24eacc83e59558df739 to your computer and use it in GitHub Desktop.
jk
import Foundation
print("Type your age: ")
if let input = readLine() {
print("You typed \(input)\n")
}
print("Type your birth year: ")
if let input = readLine() {
print("You typed \(input)\n")
}
print("this year is: \(2020)") //will be correct for the rest of the year and as long as user enters inputs correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment