36    for (
int div = 2; div * div <= num; ++div) {
 
   40            if (div == (num / div)) {
 
   44                sum += (div + (num / div));
 
 
   74    std::cout << 
"All tests have successfully passed!" << std::endl;
 
 
static void tests()
Self-test implementations.
bool are_amicable(int x, int y)
Function to check whether the pair is amicable or not.
int sum_of_divisor(int num)
Function to calculate the sum of all the proper divisor of an integer.