This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

14 lines
219 B
ObjectPascal

function IsPrime(x: integer): boolean;
begin
var sqx := Round(Sqrt(x));
var i := 2;
while (i <= sqx) and (x mod i <> 0) do
i += 1;
Result := i > sqx;
end;
begin
Range(2,1000).Where(IsPrime).Print;
end.