Question: In C++, Write a function, sumdivisors, that takes a single integer parameter and returns the sum of all the divisors of the parameter (including 1).
In C++, Write a function, sumdivisors, that takes a single integer parameter and returns the sum of all the divisors of the parameter (including 1). So sumdivisors(6) will return 6 as 1+2+3=6. Note you may use a wrapper function or default parameters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
