Search
 
SCRIPT & CODE EXAMPLE
 

C

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));
}
Comment

PREVIOUS NEXT
Code Example
C :: Reverse every Word of given String 
C :: uri/beecrowd problem no - 1133 solution in C 
C :: list fiter octobercms 
C :: how to delete data and add from file in c language 
C :: 50 north main 07522 
C :: WARNING: QA Issue: rdepends on 
C :: arcpy buffer 
C :: shortest job first 
C :: Sum of upper & lower triangles elements 
C :: sadsa 
C :: program to merge two strings in c 
C :: Uri/Beecrowd problem no - 1149 solution in C 
C :: opération bit à bit c 
C :: how to use arry 
C :: print binary in c 
C :: declaration of arrays 
C :: nosql injection 
C :: arduino ip to string 
C :: c local variable 
Dart :: How to create a round CheckBox in Flutter 
Dart :: flutter get current date 
Dart :: Dart integer User input 
Dart :: canonical tag 
Dart :: how to get value from user in dart 
Dart :: flutter types class enum 
Dart :: flutter on build complete 
Dart :: flutter text decoration underline color 
Dart :: custom error snackbar with icon flutter 
Dart :: final vs const dart 
Dart :: round off in dart 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =