C Program To Find The Reverse of a Given Number.

#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev,s=0;
clrscr();
printf("Enter the value of N");
scanf("%d",&n);
while(n>0)
{
r=n%10;
s=(s*10)+r;
n=n/10;
}
printf("\nThe reverse of the number is %d",s);
getch();
}


Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:

Post a Comment