Program JamDigital;
Uses WinDos, WinCrt;
Var
jam, Menit, Second, Hund : Word;
Function LeadingZero(W : Word) : String;
Var S : String;
Begin
Str(W:0, S);
If Length(S) = 1 Then S:='0'+S;
LeadingZero:=S;
End;
Begin
GetTime(jam, Menit, Second, Hund);
WriteLn('Menujukan jam = ', LeadingZero(jam), ':', LeadingZero(Menit), ':',LeadingZero(Second), '.', LeadingZero(Hund));
End.
hasil screen :
2 komentar
boleh minta penjelasan programnya? thanks
Saya udh nyoba tapi gagal, tlg bantu jelaskan ya
Posting Komentar