Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cmath>
- using namespace std;
- int main(){
- int t;
- cin >> t;
- while (t>0){ t--;
- int n; cin >> n;
- int digit=0;
- if (n==0){cout<< 0; break;}
- for (int i=n; i>0; i/=10){
- digit=i%10;
- cout << digit << " ";
- } cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment