- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
5 Posted Topics
So I have a bit of a problem... A la I am posting on this forum. If you will bare with me for a short narrative I can explain the situation. Currently a department in my school is involved in a Weather data collection project which they have asked me … | |
Re: just increment by 2 instead of one and print every number.. for(i=0; i<x; i=i+2) | |
Re: Well whats the question? Certainly no one is going to do your CS 101 project for you. | |
Re: Actually you only need to loop through n^(1/2) [The square root of N]. Must include Math.h [CODE] bool isPrime(int i) { int t; double root = sqrt((double)(i)); for (t = 0; t<root; t++) { if(i%t==0) return false; } return true; } [/CODE] Go ahead and try this out. I didn't … | |
Re: Instead of using an array, why not use vector's vector<char> A; A.pushback(string) |
The End.