Monday, February 17, 2025

A rough draft of 10001st Prime

 {

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

Dbf не чіпаємо, маніпуляції тільки з itab

 1. Dbf tab містить ВСІ 67-68 полів,  Ztab - тільки ті 25-45 полів що використовуються в продовженні ресурсів, їх і копіюємо Dbf не редагува...