fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int num,curr;
  6. scanf("%d",&num);
  7. curr = 1;
  8. while (num/curr>0){
  9. printf("%d\n",num/curr);
  10. curr=curr*10;
  11.  
  12. }
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5316KB
stdin
1791
stdout
1791
179
17
1