You are on page 1of 1

Simple Tiebreaker Program

This is just a simple progam where you enter in one number for one person, and another for another
person and
see who has the number closest to the computer's number.

Here is the code:


'State Variables
dim RandomNumber
RandomNumber = rnd () % 10 + 1

'Print Screen
Printr "Tiebreaker"
Printr ""
Printr "Enter a number Between 1 and 10,"
Printr "then press Return."
Printr ""
Printr "Person #1:"
Input$ ()
Printr ""
Printr "Person #2:"
Input$ ()
Printr ""

'Reveal Answer
Printr "The answer was: " + RandomNumber
Printr ""
Printr ""

'Quit
Printr "Press Q to exit program."
While True
If Lcase$ (Inkey$ ()) = "q" Then
End
Endif
Wend

Just copy this into Basic4gl and save.


The program only shows the answers, and does not tell you who won, this was made by me in 2 mins.
It was made to be an Exe that quits using 'Q'.
Enjoy!

You might also like