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