Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
14.985 Beiträge
 
#1

Fun Code of the Week #6: Primality Checking

  Alt 27. Okt 2012, 23:21
  I decided to give KhanAcademy a spin, and watched this set of videos:  Level 1: Primality Test And that let to me writing this code: function IsPrime(const x: integer): Boolean; var i: integer; begin i := 2; repeat if X mod i = 0 then begin Result := False; ...

More...
  Mit Zitat antworten Zitat