{ dogYears.p Started by Jeff Ondich on 1/2/96 Last modified: 1/2/96 This program makes an important calculation for you, and contains a function, to boot. } program dogYears(input,output); var age : real; function dogAge( humanAge : real ) : real; begin if humanAge <= 20 then dogAge := humanAge / 20 else dogAge := 1 + (humanAge - 20)/5 end; begin write( 'How old are you? ' ); readln( age ); writeln( 'If you were a dog, you would be ', dogAge(age), ' years old.' ) end.