home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l074 / 1.ddi / TRIVIA.TRU < prev    next >
Encoding:
Text File  |  1985-01-05  |  825 b   |  32 lines

  1. ! Trivia quiz.
  2. !
  3. READ num_quest                    ! Number of questions
  4.  
  5. FOR i = 1 to num_quest            ! Read all questions
  6.  
  7.     READ question$, answer$       
  8.  
  9.     PRINT question$;
  10.     LINE INPUT reply$             ! Get user's guess
  11.  
  12.     IF reply$ = answer$ then      ! If correct...
  13.        LET right = right + 1      ! count right replies
  14.        PRINT "Correct."           ! and say bravo.
  15.     ELSE
  16.        PRINT "No, the correct answer is "; answer$; "."
  17.     END IF
  18.  
  19. NEXT i
  20.  
  21. PRINT "You got"; 100 * right/num_quest; "% right."
  22.  
  23. DATA 5
  24.  
  25. DATA What is the capital of Austria, Vienna
  26. DATA What year did Franklin Pierce take office, 1853
  27. DATA "What is the capital of Manitoba, Canada", Winnipeg
  28. DATA "How many years, on average, does a baboon live", 20
  29. DATA How about a gray squirrel, 5
  30.  
  31. END
  32.