Question: Write a C++ program that determines the sum of even divisors and the product of odd divisors of a number n given by the user.
Write a C++ program that determines the sum of even divisors and the product of odd divisors of a number n given by the user. You should stick to the following output. Example 1: n=24 edsum = 2 +4 +6 + 8 + 12 + 24 = 56 odprod = 1 *3 = 3 Example 2: n=15 edsum = 0 odprod = 1*3*5* 15 = 225 Example 3: n=29 edsum= 0 odprod = 1 * 29 = 29
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
