# include <stdio.h> # include <conio.h> main() { int num,tempsum; int sum=0; int reverse=0; clrscr(); printf("Enter 5 digit no"); scanf("%d",&n); while(num>0) { tempsum= num%10; sum+=tempsum; reverse=reverse*10+tempsum; num=num/10; } printf("The sum of the digits is :%d",sum); printf("the reverse of the no is %d",reverse); getch(); }
Application development and sharing our knowledge to developer to developer for helping knowledge to build a effective solution for web architect.
Saturday, February 9, 2013
C Program To Find The Sum And Reverse Of A Number in c program
Subscribe to:
Posts (Atom)