Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Problem 21 solution More...
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Functions | |
unsigned long | sum_of_divisors (unsigned int N) |
int | main (int argc, char **argv) |
Problem 21 solution
int main | ( | int | argc, |
char ** | argv | ||
) |
Main function
< We use an array of flags to check if a number at the index was: not-processed = 0 is amicable = 1 not amicable = -1
unsigned long sum_of_divisors | ( | unsigned int | N | ) |
function to return the sum of proper divisors of N