Samsung Electronics interview question

Split integer into digits a