Donate SIGN UP

c++

Avatar Image
pranab | 10:54 Tue 21st Apr 2009 | Genealogy
0 Answers
i have a program but i cannot understand the code of the below program ? pls explain step by step

#include<iostream.h>
#include<conio.h>
void main
{
int num, rev=0
cout<<&quot;type in a number&quot;;
cin>>num;
while (tnum>0)
{
int rem=tnum%10;
rev=rev*10+rem;
tnum=tnum/10;
}
cout<<&quot;the reverse of &quot;<<num<<&quot;is&quot;<<rev;
}
Gravatar

Answers

rss feed

Best Answer

Nobody has yet answered this question. Once some answers have been given, pranab will be able to select one answer as the best. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
There are no answers available for this question.

rss feed

Do you know the answer?

c++

Answer Question >>