Var ma: array of array of integer; ar: array of integer; i,k,j,n,m: integer; begin; randomize; readln(n); readln(m); k: =0; setlength(ar,m+1); setlength(ma,n+1); for i: =1 to n do setlength(ma[i],m+1); writeln('matrix: '); for i: =1 to n do begin; writeln; for j: =1 to m do begin; ma[i,j]: =random(21)-10; write(ma[i,j]: 4); end; end; for i: =1 to m do begin; for j: =1 to n do if ma[j,i]> 0 then inc(k); ar[i]: =k; k: =0; end; writeln; writeln('final array: '); for i: =1 to m do write(ar[i]: 4); end.
Tamara
19.03.2020
Var a, b, c, d, k, m: real; begin readln(b, c, d, k, m); a : = b; b : = c - k; c : = d - m; d : = sqr(b) - 4 * a * c; if (a < 0) then writeln('нет точек') else if (d = 0) then writeln('(', (-1 * b + sqrt(d)) / (2 * a), '; ', k * * b + sqrt(d)) / (2 * a)) + m, ')') else writeln('(', (-1 * b + sqrt(d)) / (2 * a), '; ', k * * b + sqrt(d)) / (2 * a)) + m, '), (', (-1 * b - sqrt(d)) / (2 * a), '; ', k * * b - sqrt(d)) / (2 * a)) + m, ')'); end.