USES WINCRT;
VAR
I :LONGINT;
NM :ARRAY[1..100]OF STRING[25];
HK,SUBT :ARRAY[1..100]OF REAL;
LM :ARRAY[1..100]OF INTEGER;
TOT :REAL;
BEGIN
I:=1;
WHILE(I<=3) DO
BEGIN
WRITELN('DATA KE :',I);
WRITELN('===========');
WRITE('INPUTKAN NAMA TAMU :');READLN(NM[I]);
WRITE('INPUTKAN LAMA MENGINAP :');READLN(LM[I]);
WRITE('INPUTKAN HARGA KAMAR :');READLN(HK[I]);
SUBT[I] :=LM[I] * HK[I];
WRITELN;
TOT :=TOT + SUBT[I];
I:=I +1;
END;
WRITELN('--------------------------------------------------');
WRITELN('NO NAMA LAMA HARGA SUB ');
WRITELN(' TAMU MENGINAP KAMAR TOTAL ');
WRITELN('--------------------------------------------------');
FOR I:=1 TO 3 DO
BEGIN
WRITELN(I:3,NM[I]:15,LM[I]:10,HK[I]:10:0,SUBT[I]:8:0);
END;
WRITELN('--------------------------------------------------');
WRITELN('TOTAL :',TOT:12:0);
END.
makasih ya kaka , semoga bermanfaat ^_^
BalasHapusiya sama2... all the best for u
BalasHapus