Saturday, 15 January 2011

Program Menghitung Luas "pascal" prosedure2

Program Prosedure tanpa parameter.

PROGRAM PERTAMA;
USES CRT;
PROCEDURE HITUNGLUAS;
VAR
   P,L : INTEGER;
BEGIN
     CLRSCR;
     WRITELN('====================');
     WRITELN('LUAS PERSEGI PANJANG');
     WRITELN('====================');
     WRITE('MASUKAN PANJANG : '); READLN(P);
     WRITE('MASUKAN LEBAR   : '); READLN(L);
     WRITELN('HASIL LUAS      : ', P*L);
     WRITELN('====================');
     END;
     BEGIN
     CLRSCR;
     HITUNGLUAS;
     READKEY;
END.

No comments: