Question
Write a C++ function called find_ divisors with the following declaration: Void find_proper_divisors (unsigned long long & number, vector < unsigned long long> &divisors); The
Write a C++ function called find_ divisors with the following declaration:
Void find_proper_divisors (unsigned long long & number, vector< unsigned long long> &divisors);
The function takes a number and replaces the elements of the given vector with all of that numbers proper divisors. A proper divisor of a number n, is an integer less than n that divides n evenly. For example if given the number 12, find_proper_divisors should append 1, 2, 3, 4, and 6 to divisors (use the push_back method in vector). If the given number is less than 2, ignore it. Erase divisors in that case.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started