aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt')
-rw-r--r--CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt b/CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt
new file mode 100644
index 0000000..1eed71d
--- /dev/null
+++ b/CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt
@@ -0,0 +1,19 @@
+main()
+1) Initialize variables 'age' and 'days' and set them both to 0
+2) Get the user's age using the GetAge function
+3) Set the 'days' variable to how many days that would be in 'age' amount of years using the CalcDays function
+4) Call the PrintResults function using 'days' and 'age' as the input variables
+
+GetAge()
+1) Initialize the local variable 'age'
+2) get the user to input their age
+3) Return 'age'
+
+CalcDays()
+1) Initialize local variables 'years' and 'days' having 'years' be the input variable
+2) Calculate days to be years * DAYS_PER_YEAR (365)
+3) Return days
+
+PrintResults()
+1) Output the user's age
+2) Output the user's days oldness \ No newline at end of file