fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n,q=0;
  5.  
  6. scanf("%d",&n);
  7.  
  8. while(!(n==0)){
  9. n=n/10;
  10. q=q+1;
  11. }
  12. printf("%d",q);
  13. return 0;
  14. }
Success #stdin #stdout 0s 5312KB
stdin
-89657
stdout
5