aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Rogers <[email protected]>2022-10-19 09:09:04 -0700
committerTaylor Rogers <[email protected]>2022-10-19 09:09:04 -0700
commit94994fd443394f6a62c6949766c24a3c7caadf50 (patch)
tree48a5b816a9f5c4d6f15957608fa3983cb5e7fda7
parentAdded text output file (diff)
downloadcst116-ch9-debugging-taylorrog-94994fd443394f6a62c6949766c24a3c7caadf50.tar.xz
cst116-ch9-debugging-taylorrog-94994fd443394f6a62c6949766c24a3c7caadf50.zip
Added pseudo code
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Rogers-Pseudo-code.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Rogers-Pseudo-code.txt b/CST116-Ch9-Debugging/CST116-Ch9-Rogers-Pseudo-code.txt
new file mode 100644
index 0000000..123110f
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Rogers-Pseudo-code.txt
@@ -0,0 +1,14 @@
+1. Include iostream and use cout, cin, endl
+2. Create a constant variable [DAYS_PER_YEAR] = 365
+3. Declare variables [age] and [days]
+4. Declare functions [GetAge], [CalcDays] = [age], and [PrintResults] = [age] , [days]
+5. Perform [GetAge]
+ a. Print "Please enter your age: "
+ b. input [age]
+ c. return [age]
+6. Perform [CalcDays] = [years]
+ a. [days] = [years] * [DAYS_PER_YEAR]
+ b. return [days]
+7. Perform [PrintResults]
+ a. Print [age] "! Boy you are old!"
+ b. Print "Did you know that you are at least [days] days old?" \ No newline at end of file