Or login with:
| std::vector<factor>factorize( | unsigned int | n | ) |
#include <codecogs/maths/discrete/number_theory/factorize.h> #include <iostream> int main() { std::vector<factor> result = Maths::Discrete::NumberTheory::factorize(123456); std::cout << "The factorization of 123456 into primes is" << std::endl; for (int i = 0; i < result.size(); i++) std::cout << result[i].value << "^" << result[i].power << " "; std::cout << std::endl; return 0; }
The factorization of 123456 into primes is 2^6 3^1 643^1
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge