program konversi_detik_ke_Hari_Jam_dan_menit;
uses wincrt;
const
satuhari = 60 * 60 * 24 ;
var
hr,jm,mn,dt,Detik : longint;
ulang : char ;
begin
repeat
writeln (' ====================================================') ;
writeln (' * Program Konversi Detik ke Hari, Jam dan menit *') ;
writeln (' ====================================================') ;
writeln (' oleh Billy Abimael');
writeln;
write ( ' Masukan waktu (dalam detik) : ' );
readln (Detik);
writeln (' ',Detik ,' Detik tediri dari : .... ');
hr := Detik div satuhari ;
Detik := Detik - hr* satuhari;
jm := Detik div 3600 ;
Detik := Detik - jm * 3600;
mn := Detik div 60 ;
dt := detik - mn * 60 ;
Writeln (' ', hr, ' hari ');
Writeln (' ', jm, ' jam ');
Writeln (' ', mn, ' menit ');
Writeln (' ', dt, ' detik ');
write ('Mau Mencoba lagi ? (y/n) : ');
readln(ulang);
until (ulang = 'n') or (ulang = 'N');
writeln;
writeln ( '========= Abimael Zone ==============') ;
end.
uses wincrt;
const
satuhari = 60 * 60 * 24 ;
var
hr,jm,mn,dt,Detik : longint;
ulang : char ;
begin
repeat
writeln (' ====================================================') ;
writeln (' * Program Konversi Detik ke Hari, Jam dan menit *') ;
writeln (' ====================================================') ;
writeln (' oleh Billy Abimael');
writeln;
write ( ' Masukan waktu (dalam detik) : ' );
readln (Detik);
writeln (' ',Detik ,' Detik tediri dari : .... ');
hr := Detik div satuhari ;
Detik := Detik - hr* satuhari;
jm := Detik div 3600 ;
Detik := Detik - jm * 3600;
mn := Detik div 60 ;
dt := detik - mn * 60 ;
Writeln (' ', hr, ' hari ');
Writeln (' ', jm, ' jam ');
Writeln (' ', mn, ' menit ');
Writeln (' ', dt, ' detik ');
write ('Mau Mencoba lagi ? (y/n) : ');
readln(ulang);
until (ulang = 'n') or (ulang = 'N');
writeln;
writeln ( '========= Abimael Zone ==============') ;
end.
0 comments :
Post a Comment