A matrix of order n and a number k are given. split the elements of the kth row by the diagonal

A matrix of order n and a number k are given. split the elements of the kth row by the diagonal element located in that row. display the original and the resulting matrix.

program array_k;

var k, n: integer;
var a: array [1..15, 1..15] of integer;

begin
writeln (‘Set the order of the matrix n (0 <n <15)’);
readln (n);
writeln (‘Set number k (0 <k <n)’);
readln (k);

for m: integer: = 1 to n do
begin
writeln;
for o: integer: = 1 to n do
begin
a [m, o]: = random (30) + 1;
// + 1 – to avoid division by zero
write (a [m, o]: 5, ”)
end
end;
writeln;
for m: integer: = 1 to n do
begin
writeln;

for o: integer: = 1 to n do
if m = k then write (a [m, o] / a [k, k]: 5: 2, ”)
else write (a [m, o]: 5, ”);
end
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.