Write a program to reverse a number?
Answer / Mahavir Singh
Here's an example program in C++ to reverse a number:
```cpp
#include<iostream>
using namespace std;
void reverse(int n) {
int reversed = 0, remainder;
while (n != 0) {
remainder = n % 10;
reversed = reversed * 10 + remainder;
n /= 10;
}
cout << "Reversed number: " << reversed << endl;
}
int main() {
int num;
cout << "Enter a positive integer: ";
cin >> num;
reverse(num);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
how we can call xml file in java file using Android platform?
what are the things i had to say in personal introduction in hr round mail me to prasanna.1867@rediff.com
what is posix?
Programs in JAVA to get the remainder and quotient of given two numbers without using % and / operators?
hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...
the systematic access of small computers in a distributed data processing system is referred as?
I need source code for Enrollment System using Visual Basic 6.0/2008 database MS Access 2007 for my school thesis project...please help me..kindly send in my email jpinedamcp@gmail.com
Find out the list of authorization objects which contains activity as a field? Thanks in advance.
how do we provide security for web services
1.what is the vesition managment.
. With the help of above table EMP, perform the following operation is sql. a) Add the new column “DEPTNO” b) Rename the table c) Update table d) Modify the table if column ‘SAL’ whose data type is number (10) and you want to enter varchar2 (15) . For example $USD 20 etc.
What is a PID? How is it useful when troubleshooting a system?