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.
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.