Advertisement
Ahmed_Negm

Untitled

Dec 10th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<cmath>
  4. #include<algorithm>
  5. #include <algorithm>
  6. using namespace std;
  7. void Ahmed_Negm(){
  8.   #ifndef ONLINE_JUDGE  
  9.     freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  10.   #endif
  11. }
  12. int main()
  13. {Ahmed_Negm();
  14.  
  15. int test;
  16. cin>>test;
  17. for(int i = 1; i <= test; i++){
  18.   long long num, digit;
  19.   cin>>num;
  20.   while(num>0){
  21. digit = num%10;
  22. cout<<digit<<" ";
  23. num /= 10;
  24.  
  25.   }
  26.  
  27. cout<<endl;
  28.  
  29.  
  30.  
  31.  
  32. }
  33.  
  34.  
  35.  
  36.  
  37.  
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement