Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type
- Vec = array [0 .. 2] of Real;
- const
- Arr: Vec = (12, 134, 1);
- var
- I, J: Byte;
- t: Text;
- Matr: array [0 .. 2] of array [0 .. 4] of integer;
- begin
- assign(t, 'out.pas');
- rewrite(t);
- Writeln('Одномерный массив: ');
- Writeln(t, 'Одномерный массив: ');
- for I := 0 to High(Arr) do
- begin
- Write(Arr[I]:5:2);
- Write(t, Arr[I]:5:2);
- if (I <> High(Arr)) then
- begin
- Write(', ');
- Write(t, ', ');
- end;
- end;
- Writeln;
- Writeln('Введите элементы двумерного массива');
- for I := 0 to High(Matr) do
- begin
- for J := 0 to High(Matr[0]) do
- begin
- Write('Matr[', I, ',', J, '] = ');
- Readln(Matr[I, J]);
- end;
- end;
- Writeln;
- Writeln('Двумерный массив: ');
- Writeln(t, 'Двумерный массив: ');
- for I := 0 to High(Matr) do
- begin
- for J := 0 to High(Matr[0]) do
- begin
- Write(Matr[I, J]:5);
- Write(t, Matr[I, J]:5);
- end;
- Writeln(t);
- Writeln;
- end;
- Close(t);
- Readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement