diff options
| author | abd00l4h <[email protected]> | 2022-10-18 19:54:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-10-18 19:54:57 -0700 |
| commit | 47eedecb01026c5363b335c2acbde28d5479caa0 (patch) | |
| tree | 60719fd1c2e4aaa79149ec78fc66278de8e6377a /CST116-Ch9-Debugging | |
| parent | finished debugging exercise 3 and updated debugging exercise 2 with technical... (diff) | |
| download | cst116-ch9-debugging-abd00l4h-47eedecb01026c5363b335c2acbde28d5479caa0.tar.xz cst116-ch9-debugging-abd00l4h-47eedecb01026c5363b335c2acbde28d5479caa0.zip | |
Add files via upload
Diffstat (limited to 'CST116-Ch9-Debugging')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-CH9-Output-Havaldar.txt | 3 | ||||
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-PsuedoCode-Havaldar.txt | 20 |
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 |