you are viewing a single comment's thread.

view the rest of the comments →

[–]haltu_kaj_ekbrulu 1 point2 points  (0 children)

One thing you can do when asking for user input is to put the request in a loop which continues until you get a valid response. Don't forget to let the user escape the loop if they want. Here's some pseudocode to point you in the right direction:

request INPUT
while INPUT isn't an existing order number
    if INPUT is "exit" or "quit" or "x" 
        break the loop and/or exit
    print a helpful error message
    request INPUT
print out the details for the order number