Поделитесь своими знаниями, ответьте на вопрос:
Нарисуйте блок-схему по программам (pascal): 1) uses crt; var x, a, b, e: real; n: integer; function f1(x: real): real; begin f1: =(sin(x)/cos(; end; function f2(x: real): real; begin f2: =sqr(sin(x))/sqr(cos(x)); end; begin a: =4.4; b: =4.67; writeln('e='); readln(e); n: =0; if f1(a)*f2(a)> 0 then x: =a else x: =b; while abs(f1(x))> e do begin n: =n+1; x: =x-f1(x)/f2(x); end; writeln('x=', x, ' ', 'n=', n); end. 2)uses crt; function f(x: real): real; begin f: =(sin(x)/cos(; end; var x, a, b, e, c: real; n: integer; begin a: =4.4; b: =4.67; writeln(''); readln(e); c: =(f(b)*a-f(a)*b)/(f(b)-f(a)); if f(a)*f(c)> 0 then a: =c else b: =c; n: =1; repeat x: =c; c: =(f(b)*a-f(a)*b)/(f(b)-f(a)); if f(a)*f(c)> 0 then a: =c else b: =c; n: =n+1; until (abs(x-c) writeln('x=', c: 0: 5); writeln('n=', n); end.
const
handsfree = false;
nmax = 10;
random_min = -50;
random_max = 50;
var
a: array[0..nmax] of real;
i, n: integer;
sum, x: real;
begin
{ввод массива}
n := nmax;
if handsfree then begin
for i := 0 to n do
begin
a[i] := random(random_max - random_min) + random_min;
write(a[i], ' ');
end
end
else begin
for i := 0 to n do
readln(a[i]);
end;
writeln();
{подсчет суммы}
write('x = ');
readln(x);
sum := a[n];
for i := n - 1 downto 0 do
sum := sum * x + a[i];
writeln('S = ', sqrt(sum));
end.