fork(1) download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. /*
  5.   t is test case
  6. r = last number
  7. x = x /10 {123 ke 12 kore }
  8.   */
  9. int x, r, i, t;
  10. scanf("%d", &t);
  11. for(i = 1; i <= t; i++)
  12. {
  13.  
  14. scanf("%d", &x);
  15. if (x == 0)
  16. {
  17. printf("0");
  18. }
  19. else{
  20. while(x > 0)
  21. {
  22.  
  23. r = x % 10;
  24. printf("%d ", r);
  25. x = x / 10;
  26.  
  27. }
  28. }
  29. printf("\n");
  30. }
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. return 0;
  42. }
  43.  
Success #stdin #stdout 0.01s 5360KB
stdin
Standard input is empty
stdout