Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int num,total=0;
- printf("Enter any number: ");
- scanf("%d",&num);
- while(num!= 0)
- { total++;
- num=num/10;
- }
- printf("Total digits: %d",total);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment