-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5.2-arreglos.pas
39 lines (35 loc) · 888 Bytes
/
5.2-arreglos.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
program arreglos;
uses crt;
type
matriz=array[1..3,1..4]of integer; //Arreglo bidimensional de tipo entero
var
m:matriz;
i,j:integer;
begin
clrscr;
writeln('Procedemos a cargar la matriz...');
writeln('----------------------------------');
for i:=1 to 3 do
begin
for j:=1 to 4 do
begin
write('Ingrese dato a guardar en la fila ',i,' columna ',j,': ');
readln(m[i,j]);
end;
end;
writeln('---------------------------------------');
writeln('Presione cualquier tecla para pasar a la muestra de los datos...');
readkey;
clrscr;
writeln('Datos cargados en la matriz:');
writeln('----------------------------');
for i:=1 to 3 do
begin
for j:=1 to 4 do
writeln('El elemento guardado en la fila ', i,' columna ',j,' es: ',m[i,j]);
end;
writeln('----------------------------');
writeln('Presione cualquier tecla para finalizar...');
readkey;
clrscr;
end.