Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Lethal77X

    Please help me with my program on vectors.

    OK, this is my revised function. It prints 2, then 3 5 7 all the way to 999. I see why its doing this but im absolutely clueless on how to make it print only the prime numbers. Help. void TorF (vector<bool>& prime) { for (int current = 3; current < MAXSIZE; current++) { if...
  2. Lethal77X

    Please help me with my program on vectors.

    Hi, yes i got that far, and I've been playing around with the code in that function I posted. And i can't seem to make the code work, it still prints all 1000 numbers. The 2nd &quot;for&quot; statement is throwing me off. I know what to do, but i can't write it in code. Sorry, i'm very new to this.
  3. Lethal77X

    Please help me with my program on vectors.

    Hello, im having major problems getting my program to work. I have to list all the prime numbers from 1 to 1000. And I have to do this using a boolean vector. And i have to initialize all the numbers to true then go along and change them to false. Here's my code so far for the function that...

Part and Inventory Search

Back
Top