var x, y: real; begin x := 2; writeln('/|\'); writeln('| x | y |'); writeln('|||'); while x < 4.1 do begin y := 3 * x - 4 * sin(sqr(x)); write('| ', x:1:1, ' |', y:2:2); if y / 10 < 1 then write(' '); writeln('|'); x := x + 0.2; end; writeln('\|/') end.
(начало) | /a,b,c,d,e/ | - + < a>b and a>c and a>d and a>e> - /a/ | - + | < b>c and b>d and b>e > /b/ | - + | < b>d and b>e > - /c/ | - + | < d>e > /d/ | - | /d/(konec)
(nachalo) | /a,b,c/ | + < a=b and b=c >/'Wse starshe wseh'/ | - + + | < a=b >< a > c >/'A u B starshe C'/ | | - | | +/'C starshe wseh'/ | - + + | < b=c >< b > a >/'B u C starshe A'/ | | - | | +/'A starshe wseh'/ | - + + | < a=c >< a > b >/'A u C starshe B'/ | | - | | +/'B starshe wseh'/ | - + | < a>b and a>c > /'A starshe wseh'/ | - + | < b>c > /'B starshe wseh'/ | - | /'C starshe wseh'/(konec)
Solovetzmila
23.12.2020
// PascalABC.NET 3.0,сборка 1073 const n=10; var a,b:array[1..n] of integer; i,p,k,max:integer; begin Randomize; max:=-200; k:=0; Writeln(' № A B AixBi'); Writeln(''); for i:=1 to n do begin a[i]:=Random(21)-10; b[i]:=Random(21)-10; p:=a[i]*b[i]; Writeln(i:2,a[i]:4,b[i]:4,p:5); if p<0 then begin Inc(k); if p>max then max:=p end end; Writeln(''); Writeln('Количество AixBi<0 равно ',k); Writeln('Максимум среди этих произведений равен ',max); end.
var
x, y: real;
begin
x := 2;
writeln('/|\');
writeln('| x | y |');
writeln('|||');
while x < 4.1 do
begin
y := 3 * x - 4 * sin(sqr(x));
write('| ', x:1:1, ' |', y:2:2);
if y / 10 < 1 then
write(' ');
writeln('|');
x := x + 0.2;
end;
writeln('\|/')
end.