Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/12/2007, 14:44
austen
 
Fecha de Ingreso: diciembre-2007
Mensajes: 3
Antigüedad: 16 años, 5 meses
Puntos: 0
programacion en turbo pascal

Hola estoy estudiandoinformática y es mi primer año y me han mandado a hacer un práctica ,la cual ya tengo terminada pero me sale syntax error (error de sintáxis)y me he cansado de revisar el código y nada, me podrían ayudar?





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.