suma de digitos
//Recursive function to find sum of digits of a number
int sumOfDigits(int num){
// Base condition
if(num == 0){
return 0;
}
return ((num % 10) + sumOfDigits(num / 10));
}
Also in C:
- how to remove \n from a string c
- arduino digital io pins
- generate all permutations of string
- rand in c return type
- how to run a update comand in linux
- why do you jerk while falling aslee
- C typedef
- Fibonacci program c pthread
- c memcpy
- suma de digitos
- how to go to top of file in vim
- C printf to string
- malloc in c
- how to feed a char array to function in C
- c shift array left
- how to make infinite loop in c
- opération bit à bit c
- call a function inside argument of another function c
- how to select multiple non-consecutive words on mac
- cast from float to long c
- accessing elements of 1d array using pointers
- how to check where the last char is in a string c
- error: 'endl' was not declared in this scope
- c printf uint32_t