//1 var average:real; i,cnt:integer; Begin For i:= 10 to 99 do if (i mod 7 = 0) then begin average := average + i; inc(cnt); end; average:=average / cnt; Writeln(average); end. //2 var average:real; i,cnt:integer; Begin i:= 0;cnt:= 0; while (true) do begin inc(i); if (i mod 5 = 0) then inc(cnt); average:=average + i; if (cnt = 10) then break end; average := average / 10; Writeln(average); end.
var
average:real;
i,cnt:integer;
Begin
For i:= 10 to 99 do
if (i mod 7 = 0) then
begin
average := average + i;
inc(cnt);
end;
average:=average / cnt;
Writeln(average);
end.
//2
var
average:real;
i,cnt:integer;
Begin
i:= 0;cnt:= 0;
while (true) do begin
inc(i);
if (i mod 5 = 0) then
inc(cnt);
average:=average + i;
if (cnt = 10) then
break
end;
average := average / 10;
Writeln(average);
end.
var m,u,p,t:integer;
for var i:=10 to 99 do
if i mod 7 =0 then
begin
m:=m+i; u:=u+1;
end;
Writeln('Среднее чисел которые дклятся на 7=',m/u);
for var i:=1 to 99 do
if i mod 5 = 0 then
begin
p:=p+i; t:=t+1;
if t > 10 then break;
end;
Writeln('Среднее чисел которые дклятся на 5=',p/t);
end.