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.
This is a discussion on Function that shows factors within the C Programming forums, part of the General Programming Boards category; Hello, I want to write a function that shows all factors of an integer, ive only been able to display ...
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.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
prime(int num)
That is not an algorithm.
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way