We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

# Sum of Digits of a Five Digit Number

# Sum of Digits of a Five Digit Number

+ 0 comments # **#include

## include

## include

## include

# int main() {

# int sum;

# int n;

# scanf("%d", &n);

# //Complete the code to calculate the sum of the five digits on n.

# while (n>0) {

# sum += n%10;

# n /= 10;

# }

# printf("%d",sum);

# return 0;

# }

# > *

+ 0 comments cheapest hosting services have virtually absolute control over the security of your media and content. Potential long-term savings. While the upfront cost of the server hardware is real (although not as expensive as you'd think – more on that below), the long-term savings potential is significant.

+ 0 comments #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int n, sum=0; scanf("%d", &n); while(n>0){ sum += n%10; n /= 10; } printf("%d", sum); //Complete the code to calculate the sum of the five digits on n. return 0; }

+ 0 comments You can find the solution of Sum of Digits of a Five Digit Number in C Hacker Rank Solution https://www.brokenprogrammers.com/sum-of-digits-of-a-five-digit-number-in-c-hackerrank-solution/

+ 0 comments Here are the solution of [Sum of Digits of a Five Digit Number in C Hacker Rank Solution] https://www.chase2learn.com/sum-of-digits-of-a-five-digit-number-in-c-hacker-rank-solution/

Load more conversations

Sort 571 Discussions, By:

Please Login in order to post a comment