Ver Mensaje Individual
  #15  
Antiguo 25-04-2017
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Estupendo,

Cita:
Empezado por escafandra Ver Mensaje
Código Delphi [-]
function SumaPares(n, m: Integer): Integer;
begin
  if(n mod 2 = 0) then dec(n);
  if(m mod 2 = 0) then inc(m);
  Result:= MulDiv(m-n, n+m, 4);
end;
Ya nada más para satisfacer al maestro:

Código Delphi [-]
function SumaPares(n, m: Integer): Integer;
begin
  while false do;

  if(n mod 2 = 0) then dec(n);
  if(m mod 2 = 0) then inc(m);
  Result:= MulDiv(m-n, n+m, 4);
end;



LineComment Saludos
Responder Con Cita