Write a method that decides whether two given numbers are amicable numbers or not. The function takes two numbers and does not return a value. Hint: Amicable numbers are two numbers so related that the sum of the proper divisors of the one is equal to the other, one being considered as a proper divisor but not the number itself. Such a pair is (220,284); for 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. can anyone help about this i dont know how to start
Aucun commentaire:
Enregistrer un commentaire