diff options
| author | Joseph Williams <[email protected]> | 2022-10-13 14:41:06 -0700 |
|---|---|---|
| committer | Joseph Williams <[email protected]> | 2022-10-13 14:41:06 -0700 |
| commit | ec24170d4ffe04c379881e35eb213ca416331760 (patch) | |
| tree | af8377fd154b7cd553f2fc2afce3691594f9bae7 /CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt | |
| parent | Setting up GitHub Classroom Feedback (diff) | |
| download | cst116-ch9-debugging-allthenamesaretaken3141-main.tar.xz cst116-ch9-debugging-allthenamesaretaken3141-main.zip | |
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging-Williams-PSEUDOCODE.txt | 25 |
1 files changed, 25 insertions, 0 deletions
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 |