
PROGRAM ejercicio(input,output);
VAR
L,R:integer;
B:boolean;
Datosp1b:text;
Procedure Procesarlinea(var Razon:integer; var H:boolean);
var
N1,N2:integer;
begin
H:=true;
read(Datosp1b,N1);
if eoln(Datosp1b) then
begin
H:=false;
Razon:=0;
end
else
begin
read(Datosp1b,N2);
if (N2 mod N1) <> 0 then
H:=false
else
begin
Razon:=N2 div N1;
N1:=N2;
while not eoln(datosp1b) and h do
begin
read(Datosp1b,N2);
if (N2 mod N1<> 0) or (N1*Razon<>N2) then
H:=false
else
N1:=N2;
end;
end;
end;
readln(Datosp1b);
end;
BEGIN
(*Del programa principal*)
writeln('Nombre y apellidos: ');
assign(Datosp1b,'C:\P1\Datosp1b.txt');
reset(Datosp1b);
L:=1;
while not eof(Datosp1b) do
begin
Procesarlinea(R,B);
if B then
writeln('Hay progresi¢n geom‚trica en la linea ',L,' de razon ',R)
else
writeln('No hay progresi¢n geom‚trica en la linea ',L);
L:=L+1;
end;
close(Datosp1b)
END.