Wednesday, 6 April 2016

Write a program in c++ to print reverse no using do while loop.

//wap in c++ to print reverse no using do while loop.
 


 Coding:-

#include<iostream.h>
#include<conio.h>

void main()
{

clrscr();
int a,digit;
cout<<"enter any no to find its reverse no";
cin>>a;
do
{

digit=a%10;
cout<<digit;
a=a/10;
}
while(a>0);
getch();
}



Output:- 


No comments:

Post a Comment