Recent Posts

Monday 11 May 2015

Reverse of a Number

Reversing of the number

#include<stdio.h>
#include<conio.h>

void main()
{
int a,r,sum=1;
printf("enter the number");
scanf("%d",&a);
while(a!=0)
{
r=a%10;
sum=sum*10+r;
a=a/10;
}
printf("the reverse number is %d ",sum);
getch();
}

Smart Siva

Author & Editor

In Life every second is important, In programming every line of code is important.

0 comments:

Post a Comment

 
biz.