#include< stdio.h>
#include< conio.h>
int main( )
{
int no, rev=0, rem, sum=0;
clrscr( );
printf("Enter the required integer:");
scanf("%d", &no);
while(no>0)
{
rem = no%10;
rev = (10*rev)+rem;
sum = sum+rem;
no=no/10;
}
printf("\nReverse Number : %d", rev);
printf("\nSum of the individual digits : %d", sum);
getch( );
return 0;
}
Note: If any compile errors, please mail to me..
nice program
ReplyDeleteFor Best C Programs with Full Explanatons..
ReplyDeleteVisit Here ►► Lightning Code