Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
A C++ Program to check whether a pair of numbers is an amicable pair or not. More...
#include <cassert>
#include <iostream>
Namespaces | |
namespace | math |
for IO operations | |
Functions | |
int | math::sum_of_divisor (int num) |
Function to calculate the sum of all the proper divisor of an integer. | |
bool | math::are_amicable (int x, int y) |
Function to check whether the pair is amicable or not. | |
static void | tests () |
Self-test implementations. | |
int | main () |
Main function. | |
A C++ Program to check whether a pair of numbers is an amicable pair or not.
An Amicable Pair is two positive integers such that the sum of the proper divisor for each number is equal to the other number.
int main | ( | void | ) |
|
static |
Self-test implementations.