|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Program to return the Aliquot Sum of a number. More...
#include <cassert>#include <iostream>Namespaces | |
| namespace | math |
| for IO operations | |
Functions | |
| uint64_t | math::aliquot_sum (const uint64_t num) |
| static void | test () |
| Self-test implementations. | |
| int | main () |
| Main function. | |
Program to return the Aliquot Sum of a number.
The Aliquot sum s(n) of a non-negative integer n is the sum of all proper divisors of n, that is, all the divisors of n, other than itself. For example, the Aliquot sum of 18 = 1 + 2 + 3 + 6 + 9 = 21
| int main | ( | void | ) |
|
static |
Self-test implementations.