Initial commit
This commit is contained in:
commit
15c381aaae
19 changed files with 828 additions and 0 deletions
25
sum_of_digits.h
Normal file
25
sum_of_digits.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding
|
||||
* ---------------------------------------------------------
|
||||
* Title: Sum of Digits
|
||||
* Author: */ your name /*
|
||||
* ----------------------------------------------------------
|
||||
* 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 <stdbool.h>
|
||||
|
||||
int sum_of_digits_recursive(int n);
|
||||
int sum_of_digits_iterative(int n);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue