Skip to content

Commit

Permalink
Add guessnum demo
Browse files Browse the repository at this point in the history
  • Loading branch information
0x24a committed Aug 30, 2023
1 parent d415513 commit f8f8279
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/guessnum.sbl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use randint
main
var number=randint(0,100)
output "我想好了在0-100间的一个数字,快来猜吧!\n"
loop forever
let int result
output "你猜是: "
inputto result
if result == number
output "猜对辣!"
exit 0
end
if result > number
output "太大啦!"
else
output "太小啦!"
end
end
end

0 comments on commit f8f8279

Please sign in to comment.