Question: Please help me with the flowchart and the code in MatLAB Amicable numbers are a pair of numbers with the property that the sum of
Please help me with the flowchart and the code in MatLAB
Amicable numbers are a pair of numbers with the property that the sum of all of the proper divisors of the first number (not including itself) exactly equals the second number while the sum of all of the proper divisors of the second number (not including itself) likewise equals the first number. For example, 220 and 284 are amicable numbers.(They are amicable because the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110,of which the sum is 284; and the proper divisors of 284 are 1, 2, 4, 71 and 142, of which the sum is 220.) Write a program to check and display if the given two numbers are amicable or not. num1 = input('Enter the first number:'); num2 = input('Enter the second number:"); Test Case: 1 Enter the first number: 1184 Enter the second number: 1210 Yes Test Case: 2 Enter the first number: 310 Enter the second number: 450 No
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
