blob: fd605d0172cf7a6aea88eebeb1ece8e329a03908 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
begin
create constant DAYS_PER_YEAR and set it to 365
create AGE and DAYS and set them both to 0
run GETAGE and pass its result to AGE
run CALCDAYS(AGE) and pass its result to DAYS
run PRINTRESULTS(AGE,DAYS)
end
GETAGE:
create local AGE
print "Please enter your age: "
get input and pass it to local AGE
return local AGE
end
CALCDAYS(YEARS):
create local DAYS
set DAYS to YEARS * DAYS_PER_YEAR
return DAYS
end
PRINTRESULTS(AGE,DAYS)
print "{AGE}! Boy are you old!\n"
print "Did you know that you are at least {DAYS} years old?\n\n"
end
|