#include<stdio.h>
#include<conio.h>
void main()
{
int rem,temp,n,sum=0;
clrscr();
printf("\nEnter any number :- ");
scanf("%d",&n);
temp=n;
while(temp!=0)
{
rem=temp%10;
sum=sum+rem;
temp=temp/10;
}
printf("\nThe Reverse number is :- %d",sum);
getch();
}
Output:-
Back to 'C Language Programs'
No comments:
Post a Comment