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