diff options
| author | Tim Pearse <[email protected]> | 2022-10-19 17:40:18 -0700 |
|---|---|---|
| committer | Tim Pearse <[email protected]> | 2022-10-19 17:40:18 -0700 |
| commit | 71a78d57dc1d7bd996a88507b2200fa4c9681874 (patch) | |
| tree | e9ea91107bd4f4e22b0958a8126fbc2bd1da3da1 /CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt | |
| parent | Change 1 : All of the debug exercises completed (diff) | |
| download | cst116-ch9-debugging-legokid1503-main.tar.xz cst116-ch9-debugging-legokid1503-main.zip | |
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt b/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt new file mode 100644 index 0000000..c0b10e6 --- /dev/null +++ b/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt @@ -0,0 +1,25 @@ +main(){ + int age, days + + age = getAge() + days = calcDays(age) + + printResults(days, age) +} + +int getAge(){ + print("How old are you?") + int age + input(age) + return age +} + +int calcDays(years){ + int days = age * 365 + return days +} + +printResults(days, age){ + print(age + "! Boy are you old!") + print("Did you know that you are at least " + days + " days old?") +}
\ No newline at end of file |