fork download
  1. #include <stdio.h>
  2.  
  3. void func(int n){
  4. if(n<10){
  5. printf("%d ", n);
  6. } else {
  7. int x, y;
  8. x = n/10;
  9. y = n%10;
  10. func(x);
  11. printf("%d ", y);
  12. }
  13. }
  14.  
  15. int main(void){
  16. int n=123;
  17. func(n);
  18. }
  19.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1 2 3