Search Results

Showing results 1 to 1 of 1
Search took 0.01 seconds.
Search: Posts Made By: verruckt24 ; Forum: C++ and child forums
Forum: C++ Feb 17th, 2009
Replies: 4
Solved: Simple Program
Views: 304
Posted By verruckt24
for(int x=1;x<=(num);x++)


Since 1 is not a prime number don't begin your loop with it, rather initialize x to 2.

Definition of prime : An integer greater than one is called a prime number if...
Showing results 1 to 1 of 1

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC