1
0
This commit is contained in:
Jeff 2024-03-22 17:22:39 -04:00
parent 50b7b4bfc6
commit e858e7e20f
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
[workspace] [workspace]
members = ["dust-lang", "dust-shell"] members = ["dust-lang", "dust-shell"]
default-members = ["dust-lang"]
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]

View File

@ -5,8 +5,8 @@ secret_number = int.random_range(0..100)
loop { loop {
io.write_line("Input your guess.") io.write_line("Input your guess.")
input = io.read_line() ? "Failed to read input." input = io.read_line() ? io.write_line("Failed to read input.")
guess = int.parse(input) ? "Failed to parse input." guess = int.parse(input) ? io.write_line("Failed to parse input.")
if guess < secret_number { if guess < secret_number {
io.write_line("Too low!") io.write_line("Too low!")