Hands-On Exercise 2
Your second hands-on exercise is a modification of the mydatent routine you already wrote:
-
Make a new procedure, called prompt, to contain the three prompts you already have. Make a new procedure, called display, to contain the display code. Use public variables so that these two procedures can share variables.
-
Above your two new procedures, add the main driver code of your routine. This should not be written inside a procedure. It should be a loop that calls the prompt and display procedures. The loop should quit when the user doesn't enter anything at the Name prompt.
-
Save and run the new version of your routine.
For instructions, click below.