cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
how to get the prime factor a a given nu
how to get the prime factor a a given number?
Sep 16, 2008 at 8:58am UTC
kirashin
(2)
please post your reply,
Sep 16, 2008 at 9:46am UTC
Faldrax
(324)
My solution would be to write a short program to calculate it.
If you want to learn how to do this, please post details of your attempt and specific problems and someone will give you some help in compleating it.
Sep 16, 2008 at 11:43am UTC
Mitsakos
(343)
Wikipedia can help you:
http://en.wikipedia.org/wiki/Prime_factor
Sep 18, 2008 at 5:58pm UTC
matanuragi
(30)
dear sir,
hope following loop will solve your problem
int num,i;
for(i<1;i<=num;i++)
{
if(num%i==0)
cout<<i<<"\n";
}
With Regards,
Matanuragi
Last edited on
Sep 18, 2008 at 6:07pm UTC
Sep 18, 2008 at 7:06pm UTC
jpeg
(133)
Matanuragi,
1. Please don't post code for people who have not even attempted to write the program themselves.
2. Your code has quite a few errors in it. It would be smart to check your code before you post it as an answer.
Topic archived. No new replies allowed.