Question: ((C++)) Amicable Numbers Two numbers are amicable if the sum of the proper divisors of one is equal to the other. The pair of numbers
Amicable Numbers Two numbers are amicable if the sum of the proper divisors of one is equal to the other. The pair of numbers 220 and 284 are amicable because the proper divisors of 220 are: 1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110 (their sum is 282) the proper divisors of 282 are: 1, 2, 4, 71, 142 (their sum is 220) Write a program that prompts the user to enter two numbers, checks, and prints whether the two numbers are related or not. Sample inputs / outputs: Enter two numbers: 220 284 The two numbers 220 and 284 are related
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
