learning-to-code/qb64/guessing-game.bas

25 lines
755 B
QBasic
Raw Permalink Normal View History

2021-04-21 02:22:17 +00:00
score% = 0
Print "Hello, Player! What is your name?"
Input ; name$
Print
Print "Welcome " + name$ + "!"
Print "Please answer the following questions."
Print "A score of 5 is perfect."
Print "What is the result of 1 + 1?"
Input ; answer
If answer = 2 Then score = score + 1
Print "What does 3 times 4 equal?"
Input ; answer
If answer = 12 Then score = score + 1
Print "What is the answer to 81 divided by 9"
Input ; answer
If answer = 9 Then score = score + 1
Print "What does 7 time 8 plus 10 equal"
Input ; answer
If answer = 66 Then score = score + 1
Print "What is the answer to the ultimate auestion of life, the universe, and everything."
Input ; answer
If answer = 42 Then score = score + 1
2021-03-03 22:42:43 +00:00
print "Your score: " + score
2021-04-21 02:22:17 +00:00
print "You have the skill of