Quizzes & Puzzles54 mins ago
c++
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<<"type in a number";
cin>>num;
while (tnum>0)
{
int rem=tnum%10;
rev=rev*10+rem;
tnum=tnum/10;
}
cout<<"the reverse of "<<num<<"is"<<rev;
}
#include<iostream.h>
#include<conio.h>
void main
{
int num, rev=0
cout<<"type in a number";
cin>>num;
while (tnum>0)
{
int rem=tnum%10;
rev=rev*10+rem;
tnum=tnum/10;
}
cout<<"the reverse of "<<num<<"is"<<rev;
}
Answers
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.