aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-CH9-Smith-Pseudo-Code.txt
blob: 1eed71d6aff66c88a8c61e94e6e33d19fe44bfd5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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