Ответ:
program zadacha;
var x, y, sr: real;
k: integer;
begin
x := -2;
while x <=2 do begin
y := x*x*x+cos(4*x);
if y > 0 then begin
sr := sr + y;
k := k+1;
end;
x := x+0.2;
sr := sr / k;
writeln(sr);
end.
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
program zadacha;
var x, y, sr: real;
k: integer;
begin
x := -2;
while x <=2 do begin
y := x*x*x+cos(4*x);
if y > 0 then begin
sr := sr + y;
k := k+1;
end;
x := x+0.2;
end;
sr := sr / k;
writeln(sr);
end.
Объяснение: