From ec24170d4ffe04c379881e35eb213ca416331760 Mon Sep 17 00:00:00 2001 From: Joseph Williams Date: Thu, 13 Oct 2022 14:41:06 -0700 Subject: finished --- .../CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt') diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt new file mode 100644 index 0000000..fd605d0 --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt @@ -0,0 +1,25 @@ +begin +create constant DAYS_PER_YEAR and set it to 365 +create AGE and DAYS and set them both to 0 +run GETAGE and pass its result to AGE +run CALCDAYS(AGE) and pass its result to DAYS +run PRINTRESULTS(AGE,DAYS) +end + +GETAGE: +create local AGE +print "Please enter your age: " +get input and pass it to local AGE +return local AGE +end + +CALCDAYS(YEARS): +create local DAYS +set DAYS to YEARS * DAYS_PER_YEAR +return DAYS +end + +PRINTRESULTS(AGE,DAYS) +print "{AGE}! Boy are you old!\n" +print "Did you know that you are at least {DAYS} years old?\n\n" +end \ No newline at end of file -- cgit v1.2.3