blob: 1d80833f44cb545a666f7b0fb008b2d059b43179 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
Start Program
Initialize a constant integer "DAYS_PER_YEAR" to 365
Initialize a function GetAge()
Initialize a function CalcDays() which passes the age
Initialize a function PrintResults() which passes age and days, both are ints
Initialize the iintegers age and days
Run the fucntion GetAge()
Prompt the user for their age
Store it into the variable age
Run the function CalcDays(age)
Perform the multiplication of DAYS_PER_YEAR and age
Return the integer days
Store the output from the previous function to the int days
Run th efunction PrintResults(age,days)
print the users age, and tell them how many days old they are
End Program
|