#include <stdio.h>
unsigned SumNumberProperDivisors(const unsigned num) {
unsigned sum = 0;
for (unsigned i = 1, j; i <= num / 2; i++) {
if (num % i == 0) {
printf("%u, ", i);
sum += i;
}
}
return sum;
}
int main()
{
printf("\n%u", SumNumberProperDivisors(220));
return 0;
}
/*
run:
1, 2, 4, 5, 10, 11, 20, 22, 44, 55, 110,
284
*/