Skip to content

Instantly share code, notes, and snippets.

@alexandreelise
Last active October 7, 2023 19:39
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 alexandreelise/d499670dfba205b4b4d867e3ef1b4706 to your computer and use it in GitHub Desktop.
Save alexandreelise/d499670dfba205b4b4d867e3ef1b4706 to your computer and use it in GitHub Desktop.
Tiny hungry foodie Swift script. Originally made in PHP.
/**
* Tiny hungry foodie swift script
*
* @package tinyhungryfoodie
* @author Mr Alexandre J-S William ELISÉ <code@apiadept.com>
* @copyright (c) 2009 - present . Mr Alexandre J-S William ELISÉ . Tous droits réservés.
* @license MIT
* @link https://apiadept.com
*/
var food: String? = "water"
repeat {
print("I am hungry!")
food = readLine()
print("Miam! Miam! \(food ?? "water")")
} while (food != "end")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment