Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Global $hFile
- $hFile = FileOpen ( "primzahlen.txt", 2 )
- Dim $aPrimzahlen[20000]
- $aPrimzahlen[0]=2
- $gefunden = 1
- $timer = TimerInit()
- Beep(500,500)
- for $j = 3 To 100000 Step 2
- for $i=0 to $gefunden
- if Mod($j,$aPrimzahlen[$i]) = 0 then ContinueLoop 2
- Next
- $aPrimzahlen[$gefunden]=$j
- $gefunden +=1
- Next
- MsgBox(0,0,TimerDiff($timer))
- For $i=0 to $gefunden
- FileWrite($hFile,$aPrimzahlen[$i]&@CRLF)
- Next
Add Comment
Please, Sign In to add comment