Program CheckWeight (input, output); { This program prompts the user for his weight in pounds and height in inches, computes the Body Mass Index (BMI) and displays "Underweight" if BMI is less than 18, "Normal" if BMI is between 18 and 25, and "Overweight" if BMI is greater than 25. BMI is defined as weight, in kilograms, divided over the squared height, in meters. } const kgInPound = 0.4536; metersInInch = 0.0254; var weight, height : real; BMI : integer; function BodyMassIndex(weight, height : real) : integer; { Takes weight in kilograms and height in meters. Returns the value of BMI rounded to the nearest integer. } var bmIndex : real; begin bmIndex := weight / (height * height); BodyMassIndex := round(bmIndex); end; begin { main program } write ('Enter your height in inches ==> '); readln (height); write ('Enter your weight in pounds ==> '); readln (weight); weight := weight * kgInPound; height := height * metersInInch; BMI := BodyMassIndex(weight, height); writeln ('Your BMI = ', BMI); if BMI < 18 then writeln ('Underweight') else if BMI <= 25 then writeln ('Normal') else writeln ('Overweight'); end.