| | |
help with array that determines prime numbers
![]() |
•
•
Join Date: Feb 2005
Posts: 10
Reputation:
Solved Threads: 0
Hi,
My assignment for class was to produce a program that runs the seive of eratosthenes to determine all the prime numbers between 2 and n, with n no larger than 100. I tryed to write the program with a boolian array that will turn all non-primes to false up to the max of 100, and then only output to the requested input of n.
Quite honestly, this confuses me and I am not even sure I have the process right, let alone the program. As is, I am getting an unresolved external error upon linking. Line 38 is what I am most unsure of, and for some reason think my error is there.
Any advice or help on getting this thing running would be much appriciated. How am I doing?
Thanks.--Will
My assignment for class was to produce a program that runs the seive of eratosthenes to determine all the prime numbers between 2 and n, with n no larger than 100. I tryed to write the program with a boolian array that will turn all non-primes to false up to the max of 100, and then only output to the requested input of n.
Quite honestly, this confuses me and I am not even sure I have the process right, let alone the program. As is, I am getting an unresolved external error upon linking. Line 38 is what I am most unsure of, and for some reason think my error is there.
Any advice or help on getting this thing running would be much appriciated. How am I doing?
Thanks.--Will
•
•
Join Date: Feb 2005
Posts: 10
Reputation:
Solved Threads: 0
OK, I got a bit further and think I have the basic idea down, however, I am still getting the unresolved externals message. Attatched is my improved code. Thanks. Will
•
•
•
•
Originally Posted by notdumb
Hi,
My assignment for class was to produce a program that runs the seive of eratosthenes to determine all the prime numbers between 2 and n, with n no larger than 100. I tryed to write the program with a boolian array that will turn all non-primes to false up to the max of 100, and then only output to the requested input of n.
Quite honestly, this confuses me and I am not even sure I have the process right, let alone the program. As is, I am getting an unresolved external error upon linking. Line 38 is what I am most unsure of, and for some reason think my error is there.
Any advice or help on getting this thing running would be much appriciated. How am I doing?
Thanks.--Will
![]() |
Similar Threads
- displaying 50 first prime numbers (C#)
- Prime Numbers Test n/2 vs. sqrt(n) (C++)
- Prime Numbers (Python)
- Help to find prime numbers without using an array (Java)
- how do u find prime numbers in an array (C)
- Prime Numbers - Help its for college (Visual Basic 4 / 5 / 6)
- (Noob) need some help w/ Prime Numbers (C++)
Other Threads in the C Forum
- Previous Thread: Assignment guidance
- Next Thread: Checking source codes of image, audio and video files
| Thread Tools | Search this Thread |
#include adobe api array arrays asterisks binarysearch calculate char cm copyanyfile copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile createprocess() csyntax database directory dynamic feet fflush fgets file fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking highest homework i/o inches include incrementoperators input interest kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix meter microsoft mqqueue mysql number odf open openwebfoundation owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling segmentationfault send sequential shape socket socketprograming socketprogramming stack standard string systemcall turboc unix user voidmain() wab win32api windows.h





