Title / Description
Code #include<stdio.h> #include<stdlib.h> int main() { int a,b,c,d,e,f,g,h,i,j,k,l; printf("Enter a five digit number = "); scanf("%d",&a); b=a%10; c=a/10; d=c%10; e=c/10; f=e%10; g=e/10; h=g%10; i=g/10; j=i%10; k=i/10; l=b+d+f+h+j; printf("Sum of the digits = %d",l); printf("\n"); system("PAUSE"); return 0; }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code