Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created May 19, 2019 00:35
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 sturdysturge/a998b15cf9060ab4d8bc75ddb3cc6782 to your computer and use it in GitHub Desktop.
Save sturdysturge/a998b15cf9060ab4d8bc75ddb3cc6782 to your computer and use it in GitHub Desktop.
Command Line Tool with input and output
import Foundation
print("Whatever you say is repeated")
var inputString = String()
while inputString != "quit"
{
inputString = readLine()!
print("You said: \(inputString)")
}
print("The program has ended")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment