📌  相关文章
📜  suma de digitos - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:33.700000             🧑  作者: Mango

代码示例1
//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));
}