{ dogYears.p Started by Jeff Ondich on 1/2/96 Last modified: 9/11/96 This program makes an important calculation for you, and contains a function, to boot. } program dogYears(input,output); var age, newAge : 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 ); newAge := DogAge( age ); writeln( 'If you were a dog, you would be ', newAge, ' years old.' ) end.