Buenasss, ya resolvimos el tema de la matriz con este código pero me han dicho que queda mas elegante usando continuamente
MOD. Os lo pongo por aquí por curiosidad oprque ya estoy con otro ejercicio jeje.
Código Delphi
[-]
const
N=27;
A=10;
type
t_matriz=array[1..n,1..n] of integer;
var
numero:integer;
procedure comprueba (numero:integer);
var
ok:boolean;
begin
ok:=false;
if numero>=27 then begin
repeat
writeln('el numero introducido es mayor que 27');
writeln('introduza un numero de nuevo');
readln(numero);
if numerothen begin
writeln('numero introducido es correcto');
ok:=true;
end
until(ok=true);
end;
end;
var
y,x1: integer;
begin
writeln('introduzca el tamanio de la matriz[menor a 27]');
readln(numero);
comprueba(numero);
for x1:=1 to numero do
begin
writeln;
for y:=1 to numero do
begin
if (x1+y-1)>numero then
write (chr(96 + (x1+y-1)-numero))
else
write (chr (96 + (x1+y-1)));
end;
end;
writeln;
writeln;
writeln('Pulse una tecla para finalizar');
readln;
end.
Saludoss