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

((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 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
((C++)) Amicable Numbers Two numbers are amicable if the sum of the

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!