Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int countnums(int x);
- int main()
- {
- int input;
- scanf("%d",&input);
- printf("%d",countnums(input));
- }
- int countnums(int x)
- {
- int count;
- for(count=0;x!=0;count++)
- {
- x=x/10;
- }
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement