#include using namespace std; string f(int N) { string s = ""; if (N == 0) return "0"; while (N != 0) { char c = N % 10 + '0'; string t = ""; t = t + c; s = t + "," + s; N /= 10; } return s; } int main() { while (true) { int x; cout << "? "; cin >> x; cout << "\n"; string result = f(x); cout << result << "\n\n"; } }