Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n,c=0;
- scanf("%d",&n);
- do{
- n=n/10;
- c++;
- }while(n!=0);
- printf("%d",c);
- int main() {
- int n;
- int begin, end;
- scanf(" %n%d%n", &begin, &n, &end);
- printf("%0*d",end-begin, n);
- return 0;
- }
- 0000
- 0000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement