rename std functions
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
func main[] : I64
|
||||
let answer: I64 = Math.abs(Math.urandom()) % 100
|
||||
let answer: I64 = math.abs(math.urandom()) % 100
|
||||
|
||||
while true
|
||||
print("Guess a number: ")
|
||||
let guess: I64 = IO.read_line() |> String.trim() |> I64.parse()
|
||||
io.print("Guess a number: ")
|
||||
let guess: I64 = io.read_line() |> str.trim() |> str.parse_i64()
|
||||
|
||||
if guess == answer
|
||||
print("You win!")
|
||||
io.print("You win!")
|
||||
break
|
||||
else if guess < answer
|
||||
print("Too low!")
|
||||
io.print("Too low!")
|
||||
else
|
||||
print("Too high!")
|
||||
io.print("Too high!")
|
||||
Reference in New Issue
Block a user