![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2008
Posts: 7
Rep Power: 0
![]() |
so this really got me i, i have to write the numbers to an array then to the file, all i keep getting is numbers 0-99 however in the file help would be greatly appreciated.
![]() c++ Syntax (Toggle Plain Text)
|
|
|
|
|
|
#2 | |
|
hi: for(;;) goto hi;
|
Re: prime numbers now with arrays
Quote:
arrays is a const int (with no semicolon), but later you try to use it as an array. Also your for loop has a comma instead of a semicolon. p is apparently trying to be pos. Your functions are too simple to be functions (you make it more confusing than helpful).for (int c =0; c<100;c++) //Write all the arrays to 0 arrays[c]=0; pos as a limit in the last for loop.I think you should go over a tutorial from the beginning and rethink your logic here, everything is more complicated than it needs to be.
__________________
How do you play Religious Roulette? Stand around in a circle and blaspheme till someone gets struck by lightning. |
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 647
Rep Power: 4
![]() |
Re: prime numbers now with arrays
I'm surprised you got any output since your code does not compile. You should make sure your program works using standard output first.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calculate prime numbers | peaceofpi | Show Off Your Open Source Projects | 23 | Nov 2nd, 2006 1:02 AM |
| Prime Numbers | Konnor | C++ | 6 | Sep 12th, 2005 6:46 PM |
| Generating prime and composite numbers | saadmir | C | 5 | Sep 9th, 2005 4:08 PM |
| Prime numbers | thomzor | C++ | 24 | May 20th, 2005 2:02 PM |
| Help with a couple prime numbers programs!! | BehemothPhoenix | C++ | 3 | Mar 20th, 2005 2:06 PM |