
Untitled
By: a guest on
May 14th, 2012 | syntax:
None | size: 0.93 KB | hits: 15 | expires: Never
var
a,b,c,d,e,f,
h,h1,min,min1,sec,sec1,
all_h,all_min,all_sec:integer;
begin
write('Enter hours, minutes, seconds:');
readln(h,min,sec);
write('Enter hours, minutes, seconds(past time):');
readln(h1,min1,sec1);
all_h:=h+h1;
all_min:=min+min1;
all_sec:=sec+sec1;
if
( all_sec > 59 )
then
a:=all_sec mod 60;
b:=all_sec mod 60;
c:=all_min+b;
else
begin
if
( all_min > 59 )
then
d:=all_min mod 60;
e:=all_h+d
else
begin
if
( all_h > 24 )
then
f:=all_h mod 24;
else writeln(f,'day(s)',e,'hour(s)',c,'min(s)',a,'sec(s)');
end;
readln;
end.