aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cst116-ch9-debugging-wilson-pseudo-code.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/cst116-ch9-debugging-wilson-pseudo-code.txt b/cst116-ch9-debugging-wilson-pseudo-code.txt
new file mode 100644
index 0000000..dbcbfe1
--- /dev/null
+++ b/cst116-ch9-debugging-wilson-pseudo-code.txt
@@ -0,0 +1,18 @@
+SET age = 0
+SET days = 0
+SET age = GetAge function
+SET days = CalcDays function
+PRINT age and days
+
+DEFINE int age within GetAge function
+DISPLAY "Please enter your age: "
+READ age
+RETURN age
+
+DEFINE int days
+days = years * DAYS_PER_YEAR
+RETURN days
+
+PRINTRESULTS int age and int days
+DISPLAY age "! Boy are you old!"
+DISPLAY "Did you know that you are at least " days " days old?" \ No newline at end of file