#include <iostream>
#include <cstring>
int main() {
int num = 890347;
char buf[32] = "";
std::sprintf(buf, "%d", num);
std::cout << buf << std::endl;
for (int i = 0; buf[i] != '\0'; i++) {
std::cout << buf[i] << ", ";
}
std::cout << std::endl;
}
/*
run:
890347
8, 9, 0, 3, 4, 7,
*/