If a five digit number is input through the keyboard write a program to calculate the sum of its digits?

If a five digit number is input through the keyboard write a program to calculate the sum of its digits?
Myaqoob33333 Updated Answer
If a five-digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23402. //Author::Mudasir Yaqoob..... #include<stdio.h> #include<conio.h> int main() { long number,t; int i=0; long temp[5]; printf("Enter the five digit number:\n\n"); scanf("%ld",&number); while(i<=4) { t=number%10+1; temp[i]=t; number=number/10; i++; } printf("Reverse number\n\n\n\n"); for(i=4;i>=0;i--) { printf("%ld",temp[i]); } getch(); }
found this useful