#include<stdio.h>
#include<conio.h>
int main()
{
int n, rev=0, rem, sum=0;
printf("Enter a number: ");
scanf("%d", &n);
while(n!=0)
{
rem=n%10;
sum=sum+rem;
rev=rev*10+rem;
n/=10;
}
printf("Reversed Number is: %d Sum is=%d",rev,sum);
getch();
return 0;
}
Enter a number: 1234
Reversed Number is: 4321 Sum is=10