Estupendo,
Cita:
Empezado por escafandra
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