Ответы и объяснения

2014-01-24T23:57:19+04:00
CONST
   N = 30;
VAR
   sum: Real;
   i, k: Integer;
   a: Array [0..N-1] of Integer;
BEGIN
   for i := 0 to N-1 do ReadLn(a[i]);

   sum := 0; k := 0;
   for i := 0 to N-1 do
      if (a[i] < 0)and(a[i] mod a[N-1] = 0) then begin
         k := k + 1; sum := sum + a[i];
   end;

   Write(sum / k);
END.