![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#5
|
||||
|
||||
|
Código:
function EsPrimo(Num: Integer): integer;
var
temp, i, integer;
enc: boolean;
begin
i := 2;
enc := false;
while (i < N - 1) and not Enc do begin
temp := N;
while Temp > 0 do Temp := N - i;
if N = 0 enc := true;
Inc(i);
end;
return Enc;
end;
__________________
E pur si muove |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|