N
N
Nika2018-10-06 17:15:36
Pascal
Nika, 2018-10-06 17:15:36

The program on Pascal does not go further than 3 lines. What's wrong?

usescrt;
const nmax=10;
type mas=array[1;nmax] of integer,
math=array[1;max,1;max]of integer;
procedure Task;
begin
writeln('Laboratory work No. 2. Vashurkina Veronika, group 6102, option No. 5.');
writein('Get a one-dimensional array consisting of the sums of elements that do not exceed the value specified by the user in the corresponding rows of the matrix. In the resulting vector, solve the problem of finding the number of the first positive element. Sort the rows in the matrix in non-descending order of the values ​​of the elements in the first column.');
end;
Procedure ImputMatr(var a:matr; n,m:integer);
var i,j:integer;
begin
for i:=1 to n do
for j:=1 to m do begin
gotoxy(5*j,10+i);
readln(a[i;j]);
end;
end;
Procedure MatrtoMas(var a:matr;n,m:integer;var b: mas);
varf,i,j:integer;
write('Set number');
readln(f);
begin
for i:=1 to n do begin
min:=maxint;b[i]:=0;
for j:=1 to m do
if(a[i;j]=a[i+k,NStr] then begin
for j:=1 to m do begin
v:=a[i,j];
a[i, j]:=a[i+k,j];
a[i+k,j]:=v;
end;
end;
end;
end;
end.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheypnow, 2018-10-06
@glamurniy_kluben

If I remember correctly, arrays in Pascal are declared without ;

type mas=array[1..nmax] of integer,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question