home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / tutor / pro11 / oneif.bas < prev    next >
Encoding:
BASIC Source File  |  1990-09-18  |  501 b   |  12 lines

  1. 10 'ONEIF.BAS - A program to demonstrate a one-line IF statement
  2. 20 'From the GWBT04 (GW-BASIC Tutorial #4) lesson file
  3. 30 'Gets a number from the user, and prints a message if the number is LESS
  4. 40 'THAN TEN, otherwise just gives the number back.
  5. 50 '
  6. 60 'Start of main program:
  7. 70  INPUT "Enter a number between one and twenty";TESTNUMBER
  8. 80  IF TESTNUMBER < 10 THEN PRINT "YOUR NUMBER WAS LESS THAN TEN!"
  9. 90  PRINT "Your number was: ";TESTNUMBER
  10. 100 END
  11. 110 'End of program - ONEIF.BAS
  12.