print(abs(i * i - 3 * i + 0.1) - (pow(10, i) / (i - 1)))
qelmar461
09.05.2020
Const handsfree = true;
type mas100_100 = array[1..100, 1..100] of integer;
var a1, a2, a3: mas100_100; i, j, m, n: integer;
procedure InitializeMatrix(var a: mas100_100; m, n: integer); var i, j: integer; begin writeln('Данные матрицы'); for i := 1 to m do begin for j := 1 to n do if handsfree then begin a[i, j] := random(30); write(a[i, j]:2, ' ') end else read(a[i, j]); writeln; end; end;
begin writeln('Введите размер матриц'); readln(m, n);
InitializeMatrix(a1, m, n); InitializeMatrix(a2, m, n);
writeln('Вывод результата'); for i := 1 to m do begin for j := 1 to n do begin a3[i, j] := a1[i, j] * a2[m + 1 - i, n + 1 - j]; write(a3[i, j], ' '); end; writeln; end;
readln; end.
Потапова 79275136869323
09.05.2020
Const handsfree = true;
type mas100_100 = array[1..100, 1..100] of integer;
var a1, a2, a3: mas100_100; i, j, m, n: integer;
procedure InitializeMatrix(var a: mas100_100; m, n: integer); var i, j: integer; begin writeln('Данные матрицы'); for i := 1 to m do begin for j := 1 to n do if handsfree then begin a[i, j] := random(30); write(a[i, j]:2, ' ') end else read(a[i, j]); writeln; end; end;
begin writeln('Введите размер матриц'); readln(m, n);
InitializeMatrix(a1, m, n); InitializeMatrix(a2, m, n);
writeln('Вывод результата'); for i := 1 to m do begin for j := 1 to n do begin a3[i, j] := a1[i, j] * a2[m + 1 - i, n + 1 - j]; write(a3[i, j], ' '); end; writeln; end;
Если я правильно понял задание, то:
x = [float(i) for i in range(2, 7)]
for i in x:
print(abs(i * i - 3 * i + 0.1) - (pow(10, i) / (i - 1)))