Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / I have a problem with short (35 rows), PRIM finder program code.

Author
Message
szotaksoma
15
Years of Service
User Offline
Joined: 18th Apr 2011
Location: HUNGARY
Posted: 18th Apr 2011 19:33
HELLO

In last week i bored, and started to make a program that searches
PRIM numbers.

The program divides a number by 1,2,3,4... until the number.
And if Num1/Num2 (1,2,3,4...) = FLOOR(Num1/Num2) or CEIL(Num1/Num2)
the program increases Num1 by 1 and decreases Num2 to 1.

Here's the code:


Soma
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 18th Apr 2011 20:56
Kimaradt, hogy mi is a probléma. Lefuttattam, jól csinálja a dolgát, nem?

-In.Dev.X: A unique heavy story based shoot'em ~6%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 19th Apr 2011 21:57 Edited at: 19th Apr 2011 22:03
correct prime number generator :
not sure what u failed didnt look really



but hey whats actually wrong with yours? it seems to work fine?
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 19th Apr 2011 22:01
and here is the hard to read but short 13 lines of code chunk

Login to post a reply

Server time is: 2026-07-18 06:41:28
Your offset time is: 2026-07-18 06:41:28