Read from stdin
This commit is contained in:
parent
ed91280a4d
commit
7912636be6
@ -2,5 +2,12 @@ import system.io
|
||||
|
||||
open io
|
||||
|
||||
def main: io unit :=
|
||||
put_str "Gamarjoba, munde!"
|
||||
def greet (s : string) : io unit :=
|
||||
put_str $ "Hello, " ++ s ++ "!\n"
|
||||
|
||||
def main: io unit := do
|
||||
put_str "Gamarjoba, munde!\n",
|
||||
put_str "Onamae wa? ",
|
||||
name <- get_line,
|
||||
greet name
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user