program TruncatedConeArea;
varR, r, l, s: real;
beginwrite('Enter the value of R: ');readln(R);
write('Enter the value of r: ');readln(r);
write('Enter the value of l: ');readln(l);
s := (Pi (R + r) l) + (Pi R R) + (Pi r r);
writeln('The surface area of the truncated cone is: ', s:0:2);
end.
program TruncatedConeArea;
var
R, r, l, s: real;
begin
write('Enter the value of R: ');
readln(R);
write('Enter the value of r: ');
readln(r);
write('Enter the value of l: ');
readln(l);
s := (Pi (R + r) l) + (Pi R R) + (Pi r r);
writeln('The surface area of the truncated cone is: ', s:0:2);
end.