{
2,3,5,7,11,13...
13 is the 6th.
What is the 10001st
prime number?
Answer: .
}
program Prime10001st;
uses math;
var num, sqrnum, max64:Int64;
i, k, cnt : integer;
const rng = 10000;
begin
i := 0; k := 0;
max64 := Trunc(Power(2,63) - 1);
while (i < 7) do
begin
for num:= 2 to max64 do
begin
cnt := 0;
sqrnum:= Trunc(sqrt(num));
for k:=2 to sqrnum do
begin
if (num%k = 0) then
begin
cnt := cnt + 1;
//????
end;
end;
end;
//??? i := i + 1;
end;
end.
No comments:
Post a Comment