uses timer_dw;

const Nrep = 24; {количество измерений}
var
  i,l : longint;
  f,d : array[0..Nrep-1]of longint;{частота и ее 
	отклонение}
begin
  l := 0;
  for i := 1 to Nrep do begin
    f[i] := GetCPUfreq;
    d[i] := GetDelta;
    writeln(?CPU frequency:?,f[i]:8,? +/-?,d[i]:6,? kHz?);
    inc(l,f[i]);
    InitTimer;
  end;
  l := l div Nrep;
  writeln(?Average: ?,l);
  writeln(?Press Enter?);
  readln;
  for i := 0 to Nrep-1 do
    writeln(?CPU frequency:?,f[i]:8,? +/-?,d[i]:6,
                           kHz (real:?,f[i]-l:6,?)?);
end.