July 2021 0 9 Report
Паскаль. Помогите составить блок-схему к программе, пожалуйста. var a,b,h,eps,s1,s2,s:real; n,i:integer;
function f(x:real):real;
begin
f:=exp(2*x)-2*x*x;
end;
begin
readln(a,b,eps);
n:=10;
s2:=0;
s:=(f(a)+f(b))/2;
repeat
s1:=s2;
s2:=s;
h:=(b-a)/n;
for i:=1 to n-1 do s2:=s2+f(a+i*h);
s2:=s2*h;
writeln(n,' ',h:6:4,' ',s1:6:3,' ',s2:6:3);
n:=n*2;
until abs(s1-s2) end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.