Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int cantidad(int numero);
  5. main()
  6. {
  7.     printf("%d",cantidad(40));
  8. }
  9.  
  10. int cantidad(int numero){
  11.     int cant_n;
  12.     while(numero > 0){
  13.    
  14.         numero = numero/10;
  15.         cant_n++;
  16.        
  17.        
  18.     }
  19.     return cant_n;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement