Tags:
create new tag
view all tags

Algorithm hint for asking one question in lab 7

  • it should be sent an already opened file
  • Get and print the first question
  • loop from 'a' to 'd' (hint you can add one to a character variable to get to the next character)
    • print out the "counter" along with the possible answer (nicely formatted)
  • get the answer from the file
  • get the user's answer
  • tell the user if they are right or wrong
  • return an indicator of their success
Topic revision: r1 - 2023-06-20 - cathybareiss
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback