¿?¿?¿?
Publicado por Luis (29 intervenciones) el 30/05/2012 03:46:39
Como hago para q este codigo me quede en espiral¿? y no en columnas como aparece utilizando los mismos datos y los mismo for y el array osea sin modificar casi nada el codigo ayudaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
program matrices;
uses crt;
type
tabla=array [1..4,1..4]of integer;
var
matiz:tabla;
i,j:integer;
begin
clrscr;
for i:=1 to 4 do
for j:= 1 to 4 do
begin
gotoxy(25, 10);
write('matriz[',i,',',j,']=');
readln(matiz[i,j]);
end;
clrscr;
writeln('la matiz':31);
writeln; writeln;
for i:=1 to 4 do
begin
for j:= 1 to 4 do
write(matiz[i,j]:10);
writeln
end;
readkey
end.
program matrices;
uses crt;
type
tabla=array [1..4,1..4]of integer;
var
matiz:tabla;
i,j:integer;
begin
clrscr;
for i:=1 to 4 do
for j:= 1 to 4 do
begin
gotoxy(25, 10);
write('matriz[',i,',',j,']=');
readln(matiz[i,j]);
end;
clrscr;
writeln('la matiz':31);
writeln; writeln;
for i:=1 to 4 do
begin
for j:= 1 to 4 do
write(matiz[i,j]:10);
writeln
end;
readkey
end.
Valora esta pregunta


0