Autor Beitrag
newbie333 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: So 21.06.09 18:53 
Und nochmal...

Als nächstes sollen wir ein Programm erstellen, das prüft ob eine Zahl Primzahl ist oder nicht. Ich überlege gerade ob das mit diesem Programm geht, denn wenn im Memofeld nur die zahlen 1 und n stehen, müsste das ja theoretisch dann eine Primzahl sein.
Würde das gehen?
FinnO
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1331
Erhaltene Danke: 123

Mac OSX, Arch
TypeScript (Webstorm), Kotlin, Clojure (IDEA), Golang (VSCode)
BeitragVerfasst: So 21.06.09 20:00 
Neue Frage -> Neuer Thread...
newbie333 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: So 21.06.09 20:42 
Es ist aber im Prinzip eine Erweiterung von diesem Programm ;)
bole
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 107
Erhaltene Danke: 15

win 10

BeitragVerfasst: So 21.06.09 21:05 
Hallo Newbie

Benutz die Suche, es gibt viele Threds die sich mit dem Problem beschäftigen...

_________________
ein programm macht nicht das was du willst sondern was du schreibst!
newbie333 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 43



BeitragVerfasst: Di 23.06.09 13:33 
Hab ich schon, hilft mir leider nicht weiter, weil die meisten Dinge benutzen, die wir noch nicht gelernt haben ;)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 23.06.09 14:58 
Dann stell doch dazu Fragen was du nicht verstehst. Ich meine woher sollen wir denn wissen was an diesen Quelltexten das Problem ist? :nixweiss:

Prinzipiell gibts da ja einfache Algorithmen wie das Sieb des Erathosthenes, das mit einem Array auskommt, usw.