Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
274 B
2
Indexable
Never
#include <iostream>
#include <string>
using namespace std;

int main() {
    int A;
    cin >> A;

    int B;
    for (B = 1; B <= A / 10; B *= 10) {
    }

    for (; B > 0; B /= 10) {
        cout << A / B << ' ';
        A %= B;
    }
    cout << '\n';
}