aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-Ch9-Rogers-Pseudo-code.txt
blob: 123110f2b1fe88ea366b4ab670e08e76bc28e495 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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?"