0
Reverse of digit
e.g. input 12345 output 54321
2 Respostas
+ 4
https://code.sololearn.com/cWZ54cIQDUjV/?ref=app
Try converting this to C++
+ 2
Check this:
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
while (n > 0) {
cout << n % 10;
n /= 10;
}
return 0;
}
Note: It works only for 32 bit numbers.