diff options
| author | prestonderek <[email protected]> | 2022-10-18 10:35:36 -0700 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-10-18 10:35:36 -0700 |
| commit | e1d9637ef127b5b6e83cb6114e27e65ca174840f (patch) | |
| tree | 7a4a26158d4ed2d3f5bdc24489e3d6849635fb27 /CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt | |
| parent | Exercise 4 complete (diff) | |
| download | cst116-ch9-debugging-prestonderek-e1d9637ef127b5b6e83cb6114e27e65ca174840f.tar.xz cst116-ch9-debugging-prestonderek-e1d9637ef127b5b6e83cb6114e27e65ca174840f.zip | |
Commit pseudocode
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt new file mode 100644 index 0000000..0dd3c0a --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging-Preston-Pseduocode.txt @@ -0,0 +1,36 @@ +Pseudocode for Ch9 Debugging + +constant int daysperyear = 365 + +function getage +function calcdays(age) +void function printresults(age, days) + +main function begin + int age = 0 + int days = 0 + + age = getage + + days = calcdays(age) + + printresults(age, days) + +getage function begin + int age + + print "Please enter your age: " + input age + + return age + +calcdays function begin (int years) + int days + + days = years * daysperyear + + return days + +printresults function begin + print age + "! Boy you are old!" *new line + print "Did you know that you are at least " + days + " days old?" *new line
\ No newline at end of file |