Untitled
#include <iostream> #include <cmath> using namespace std; int main() { int a,doub = 0; cin >> a; int copy_a = a; while (a != 0) { doub *= 10; doub += a % 10; a = a / 10; } while (doub != 0) { cout << " " << doub % 10; doub = doub / 10; } }
#include <iostream> #include <cmath> using namespace std; int main() { int a,doub = 0; cin >> a; int copy_a = a; while (a != 0) { doub *= 10; doub += a % 10; a = a / 10; } while (doub != 0) { cout << " " << doub % 10; doub = doub / 10; } }