PROCEDURE PERSEGI_PANJANG;
VAR p,l:INTEGER;
LUAS:INTEGER;
KELILING;
BEGIN
WRITELN(’PERSEGI PANJANG’);
WRITELN(’===============’);
WRITELN;
END;
PROCEDURE MTK(p,l:INTEGER);
VAR LUAS:INTEGER;
KELILING:REAL;
BEGIN
WRITELN(’PANJANG:=p’);
WRITELN(’LEBAR:=l’);
WRITELN;
BEGIN
LUAS:=p*l;
KELILING:=2*(p+l);
WRITELN;
WRITELN(‘HASIL LUAS ‘,p,’*’,l,’=’,LUAS);
WRITELN(‘HASIL KELILING ‘.2,*(‘,p,’+’,l,’)=’,KELILING);
WRITELN;
END;
BEGIN
WRITE(‘MASUKKAN P : ‘)READLN(p);
WRITE(‘MASUKKAN L : ‘)READLN(l);
WRITELN;
MTK(p,l);LUAS:=p*l;
MTK(p,l);KELILING:=2*(p+l);
WRITELN(‘HASIL LUAS
‘,p,’*’,l,’=’,LUAS);
WRITELN(‘HASIL
KELILING ‘.2,*(‘,p,’+’,l,’)=’,KELILING);
READKEY;
END.
Comments