Answer the question
In order to leave comments, you need to log in
How to set the length of a two dimensional dynamic array array in pascal?
write code in pascal abs
var a,i,t,n:integer;
mas:array of array of real;
begin
writeln('Vvedite kolichestvo slov');
readln(n);
SetLength(mas,5,5);
for i:=0 to n do
begin
writeln('Vvedite slovo');
read(t);
b[1,i]:=t;
end;
for i:=0 to n do
begin
writeln(b[1,i]);
end;
end.
Answer the question
In order to leave comments, you need to log in
found a solution
uses Arrays;
var a,i,t,n:integer;
mas: array [,] of real;
begin
writeln('Vvedite kolichestvo slov');
readln(n);
mas := new real[1,n+1];
for i:=0 to n-1 do
begin
writeln('Vvedite slovo');
read(t);
mas[0,i]:=t;
end;
for i:=0 to n do
begin
writeln(mas[0,i]);
end;
end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question