PPT Slide

program Conversion (input,output);
const
inchesPerFoot = 12;
centimetersPerInch = 2.54;
var
feet, inches, lengthInInches: integer;
centimeters: real;
begin
write(‘What is the length in feet and inches?’);
readln(feet,inches);
lengthInInches :=inchesPerFoot * feet + inches;
centimeters :=centimetersPerInch * lengthInInches;
writeln(“The length in centimeters is’, centimeters:1:2)
end

A computer program that converts feet and inches to centimeters.

Animation

Previous slide Next slide Back to first slide View graphic version