Wap in cpp to reverse the digits of integer number using while loop

Reverse Digits of Integer

#include<iostream.h>
#include<conio.h>
void main()
{ int n,j;
cout<<”enter the integer to reverse”;
cin>>n;
while(n>10)
{
j=n%10;
n=(n/10);
cout<<j;
}
}

1 comment:

  1. Anonymous9/18/2011

    its not working .. output is coming incomplete

    ReplyDelete

If You Like The Post Or want to Add Something More
then feel free to comment