Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Last active August 29, 2015 14:07
Show Gist options
  • Save ntakouris/b1c20d7bbfc7e9df28bc to your computer and use it in GitHub Desktop.
Save ntakouris/b1c20d7bbfc7e9df28bc to your computer and use it in GitHub Desktop.
im swag
object main {
def main(args: Array[String]){
val days = List("Deftera" , "Triti" , "Tetarti" , "Pempti" , "Paraksevi" , "Savato" , "Kiriaki")
println("Insert day id here:");
val day_id = normalizeInteger(Console.readInt);
println("You chose day: " + days(day_id))
println("Insert day offset here:");
val value = normalizeInteger(day_id + Console.readInt);
println("With offset : " + value)
println(days(value))
}
def normalizeInteger(x : Int) : Int = if (x < 7) x else normalizeInteger(x - 6)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment