![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Last function called IsPrimeNumber will not work correctlyThe last function called IsPrimeNumber will not work correctly...any help will be appretiated...Thanks...
CPP / C++ / C Code:
Last edited by admin : 04-Mar-2009 at 01:55.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|||
|
#2
|
|||
|
|||
Re: Last function called IsPrimeNumber will not work correctlyCPP / C++ / C Code:
Well, you're not actually figuring out if the number is a prime or not. Currently, you loop from i = 2 to Num, and after the loop you test Num against the current value of i, which should be Num+1. How are you trying to figure out if a number is a prime or not? |
|
#3
|
|||
|
|||
Re: Last function called IsPrimeNumber will not work correctlyQuote:
else you go on ,if you come out of the loop successfully the number is surely prime. CPP / C++ / C Code:
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 65 | 19-Aug-2009 08:50 |
| Problem executing nam-1.13 | RodolfoAlvizu | Computer Software Forum - Linux | 20 | 28-Feb-2009 16:23 |
| Flex and bison coding | lucky88star | C++ Forum | 5 | 24-Dec-2007 12:57 |
| Need Help with input files. | Efferus | C++ Forum | 2 | 24-Nov-2007 17:19 |
| Random access files | Krazy_yA | C Programming Language | 6 | 07-May-2006 02:44 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The