aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt')
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Pearse-Pseudocode.txt25
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