Bài tập pascal cần mọi ngưòi giúp

T

tettrungthu17896

H

huutoan00

Mã:
uses crt;
var thisinh:array [1..10000] of record h,m,s,t:integer;
      s,b:longint;

function hms(h,m,s:longint):longint;
begin
 hms:=h*3600+m*60+s;
end;

procedure
begin
 readln(b);
 for i:=1 to b do
  with thisinh[i] do
    begin
     readln(h);readln(m);readln(s);t:=hsm(h,m,s);
     s:=s+hsm;
    end;
 s:=s div b;
write('thoi gian trung binh: ',s div 3600,'h');s:=s mod 3600;write(s div 60,'m');s:=s mod 60;write(s's');
end.
 
Top Bottom