aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch9-Debugging')
-rw-r--r--CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt3
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt20
2 files changed, 23 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt b/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt
new file mode 100644
index 0000000..999e391
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt
@@ -0,0 +1,3 @@
+Please enter your age: 18
+18! Boy are you old!
+Did you know that you are at least 6570 days old? \ No newline at end of file
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt b/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt
new file mode 100644
index 0000000..658687b
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt
@@ -0,0 +1,20 @@
+Start Program
+
+Initialize constant integer DAYS_PER_YEAR = 365
+Initialize function GetAge()
+Initialize function CalcDays(int age)
+Initialize function PrintResults(int age, int days)
+Initialize integer age = 0
+Initialize integer days = 0
+
+run function GetAge()
+ Ask user for their age and store value as age
+ return age
+run function CalcDays(age)
+ multiply age by DAYS_PER_YEAR
+ return days
+set output of CalcDays = days
+run function PrintResults(days, age)
+ Output user's age with sentence that tells them how many days they are old at least
+
+End Program \ No newline at end of file