home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / bwbasic-2.10.sit / bwbasic-2.10 / bwbtest / elseif.bas < prev    next >
BASIC Source File  |  1993-11-09  |  592b  |  27 lines

  1.  
  2. rem -----------------------------------------------------
  3. rem elseif.bas -- Test MultiLine IF-ELSEIF-THEN statement
  4. rem -----------------------------------------------------
  5.  
  6. Print "ELSEIF.BAS -- Test MultiLine IF-THEN-ELSE Constructions"
  7.  
  8. Print
  9. Print "The program should detect if the number you enter is 4 or 5 or 6."
  10. Input "Please enter a number, 1-9"; x
  11.  
  12. If x = 4 then
  13.    Print "The number is 4."
  14.  
  15. Elseif x = 5 then
  16.    Print "The number is 5."
  17.  
  18. Elseif x = 6 then
  19.    Print "The number is 6."
  20.  
  21. Else
  22.    Print "The number is neither 4 nor 5 nor 6."
  23.  
  24. End If
  25.  
  26. Print "This concludes our test."
  27.