Computer Science
all programs are in C++, C and Php language this blog is all about programming and all about bcs
Sunday, December 02, 2012
REVERSE NUMBER PROGRAM in C++
#include<iostream.h>
#include<conio.h>
int main()
{
int num;
int rev=0;
int mod;
cout<<"Enter Number= ";
cin>>num;
do
{
mod=num%10;
rev=(rev*10)+mod;
num=num/10;
}
while(num>=1);
cout<<"Reverse Is= "<<rev;
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment