program time_konv;
uses crt;
const
m = 60;
h = 60*m;
d = 24*h;
var
r: string;
d1,h1,h2,m1,m2,s1,l : integer;
s: longint;
begin
clrscr;
writeln('This Program will convert how many seconds you give to day(s), hour(s), minute(s) and second(s).');
writeln;
writeln;
write('Please input how many second(s) you wanna give : ');readln(s);
writeln;
d1:= s div d;
h1:= s mod d;
h2:= h1 div h;
m1:= h1 mod h;
m2:= m1 div m;
s1:= m1 mod m;
r:= 'Result : ';
l:= length(r) + 2;
write(r);
writeln('- ',d1,' day(s)');
writeln('- ':l,h2,' hour(s)');
writeln('- ':l,m2,' minute(s)');
writeln('- ':l,s1,' second(s)');
readkey;
end.
{Created by : Sylvert 'Syv' Tahalea}
No comments:
Post a Comment