Author Topic: Prime Program...  (Read 767 times)

Keknehv

  • Hydlaa Resident
  • *
  • Posts: 62
    • View Profile
Prime Program...
« on: December 11, 2004, 07:35:05 pm »
Hi again all.

As my first (real) project in C++, I decided to port my old BASIC (slow) prime program to C++.

The locations for the two files are:

Source:
http://freewebs.com/keknehv/prime.cpp

Compiled (Win32) program:
http://freewebs.com/keknehv/prime.exe


For all of you linux users... just download the source and run:

user@location:/folder/:c++ -o prime prime.cpp

Any comments or ideas for optimizations or bug reports are appreciated.

EDIT: converted files to links
« Last Edit: December 11, 2004, 07:35:45 pm by Keknehv »
root@stupidadmins:/ #  rm -r *

Quote
Originally posted by sesmi
my start bar thingie has moved from the bottom of the screen to the side!!!!! how do i make it go back!!!! help please!!!!!! i\'m sorry this is in the wrong forum but i\'m panicing!!!!!!

Psycon

  • Hydlaa Resident
  • *
  • Posts: 56
    • View Profile
(No subject)
« Reply #1 on: December 12, 2004, 09:17:29 pm »
The speed of the program will be greatly inhanced by writing directly the prime numbers into your code in a long array or by having them from a file. ;)
#################################
Meat shield in Incensio Tenebrae
http://www.seperot.com/it/home.php

Keknehv

  • Hydlaa Resident
  • *
  • Posts: 62
    • View Profile
(No subject)
« Reply #2 on: December 12, 2004, 09:29:24 pm »
lol :P

If you looked at the code, you would find that I already have a few included :D.

But do you really want a 70 MB prime program?
root@stupidadmins:/ #  rm -r *

Quote
Originally posted by sesmi
my start bar thingie has moved from the bottom of the screen to the side!!!!! how do i make it go back!!!! help please!!!!!! i\'m sorry this is in the wrong forum but i\'m panicing!!!!!!

RussianVodka

  • Hydlaa Notable
  • *
  • Posts: 689
    • View Profile
(No subject)
« Reply #3 on: December 12, 2004, 09:35:27 pm »
Cable companies will love you....
Dialup users will hate you....

So glad i use DSL.



Q: How many Planeshifters does it take to expalin a simple concept to a newb?
A: Six. Five to argue on who\'s explanation is right, and Moogie to lock the thread.

Keknehv

  • Hydlaa Resident
  • *
  • Posts: 62
    • View Profile
(No subject)
« Reply #4 on: December 12, 2004, 11:32:40 pm »
I have cable, but they won\'t let me use it for a server :(

Hehe... welcome HTTP port 5080!
root@stupidadmins:/ #  rm -r *

Quote
Originally posted by sesmi
my start bar thingie has moved from the bottom of the screen to the side!!!!! how do i make it go back!!!! help please!!!!!! i\'m sorry this is in the wrong forum but i\'m panicing!!!!!!