lina_os

Untitled

Oct 28th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <cmath>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. int t;
  8. cin >> t;
  9. while (t>0){ t--;
  10. int n; cin >> n;
  11. int digit=0;
  12. if (n==0){cout<< 0; break;}
  13. for (int i=n; i>0; i/=10){
  14. digit=i%10;
  15. cout << digit << " ";
  16. } cout << endl;
  17. }
  18. return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment