/*---------------------------------------------------------- * HTBLA-Leonding * --------------------------------------------------------- * Title: Sum of Digits * Author: Marc Tismonar * ---------------------------------------------------------- * Description: * Recursive and iterative implementation of an algorithm that calculates * the sum of the digits of a given positive integer. * ---------------------------------------------------------- */ /* ************************************************************* * see corresponding c-file for instructions ***************************************************************/ #ifndef ___SUM_OF_DIGITS_H #define ___SUM_OF_DIGITS_H #include int sum_of_digits_recursive(int n); int sum_of_digits_iterative(int n); #endif