Last active
August 29, 2015 14:07
-
-
Save ntakouris/b1c20d7bbfc7e9df28bc to your computer and use it in GitHub Desktop.
im swag
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
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