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 Discussion / Prime Numbers - Driving me crazy!

Author
Message
Xatinei
22
Years of Service
User Offline
Joined: 26th Feb 2003
Location:
Posted: 17th Sep 2003 23:34 Edited at: 17th Sep 2003 23:35
Im having trouble with a small program I've tried to make which finds prime numbers. I thought it would be a bit of fun, but it's turned out to be a pain in the neck. Im not exactly sure why but when I run it, it just prints all the odd numbers. I would appreciate anyone willing to take this problem on for me. Here is the code.

Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 17th Sep 2003 23:58
I have an easier way to do it, as for your code, I tried to figure it out and I don't know, not sure what you are doing exactely.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Sep 2003 02:21
I think you've just done his homework for him

JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 19th Sep 2003 05:40
now do it so it asks what you want the starting number is, and then max number (so you can have it check numbers between 10 and 30 or whatever)

<{^_^<}

Login to post a reply

Server time is: 2025-05-20 20:08:32
Your offset time is: 2025-05-20 20:08:32