Hola JPSepu96.
Intentalo así:
Código Delphi
[-]
repeat
Write ('Ingrese el codigo del producto (1-5): ');
Readln (producto);
if (producto > 0) and (producto < 6) then
begin Write ('Ingrese el movimiento a realizar (E/S): ');
Readln (movimiento); if (Upcase(movimiento)='E') or (Upcase (movimiento)='S') then
begin Write ('Ingrese la cantidad de unidades: ');
Readln (unidades);
if (unidades > 0) then
begin
case producto of
1: begin
if (upcase (movimiento) = 'E' )then
begin
entrada1:=entrada1+1;
stock11:=stock11+unidades;
unentrante1:=unentrante1+unidades;
end
else if (stock11 > unidades) then
begin
salida1:=salida1+1;
stock11:=stock11-unidades;
unsalida1:=unsalida1+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
2: begin
if (upcase (movimiento) = 'E' )then
begin
entrada2:=entrada2+1;
stock22:=stock22+unidades;
unentrante2:=unentrante2+unidades;
end
else if (stock22 > unidades) then
begin
salida2:=salida2+1;
stock22:=stock22-unidades;
unsalida2:=unsalida2+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
3: begin
if (upcase (movimiento) = 'E' ) then
begin
entrada3:=entrada3+1;
stock33:=stock33+unidades;
unentrante3:=unentrante3+unidades;
end
else if (stock33 > unidades) then
begin
salida3:=salida3+1;
stock33:=stock33-unidades;
unsalida3:=unsalida3+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
4: begin
if (upcase (movimiento) = 'E' )then
begin
entrada4:=entrada4+1;
stock44:=stock44+unidades;
unentrante4:=unentrante4+unidades;
end
else if (stock44 > unidades) then
begin
salida4:=salida4+1;
stock44:=stock44-unidades;
unsalida4:=unsalida4+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
5: begin
if (upcase (movimiento) = 'E' )then
begin
entrada5:=entrada5+1;
stock55:=stock55+unidades;
unentrante4:=unentrante5+unidades;
end
else if (stock55 > unidades) then
begin
salida5:=salida5+1;
stock55:=stock55-unidades;
unsalida5:=unsalida5+unidades;
end
else
Writeln ('La cantidad a extraer supera el stock');
end;
end
end
else
Writeln ('La cantidad de unidades deben ser mayores a 0');
end
else
Writeln ('Movimiento invalido')
end
else
Writeln ('Codigo de producto invalido');
Write ('Desea cargar otra operacion? S/N ');
Readln (op);
until Upcase(op) = 'N';
Revisa las líneas faltantes comentadas por: "(*)".
Sólo verifiqué los errores de compilación, no sé si la lógica del código cumple su cometido.
Saludos