![]() |
problem with prime no's
i want to print prime no's between 2 and 200,
in te code i've written, it is also printing 127 which is not prime, don't know why because the variable c should be greater than 2 for 127 Code: c
|
Re: problem with prime no's
c will always be greater than or equal to 2 because for 1 and num the condition is always true.
|
Re: problem with prime no's
ya, thanks, i got my problem
|
Re: problem with prime no's
Quote:
|
Re: problem with prime no's
I can not see your problem of the code. Why isn't 127 a prime?
|
Re: problem with prime no's
i know, 127 is prime,program is fine, sorry for the mistake
|
| All times are GMT +5.5. The time now is 23:14. |