Hello, I want to write a function that shows all factors of an integer, ive only been able to display prime numbers but i want all factors to show. Any help is appreciated.
Hello, I want to write a function that shows all factors of an integer, ive only been able to display prime numbers but i want all factors to show. Any help is appreciated.
What algorithm did you use to display all its prime factors? Chances are, you only need to tweak it.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
prime(int num)
That is not an algorithm.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)