haha1235  
#include <stdio.h>
int main(void)
{
    int count,number;
    count=0;
    printf("Enter a number:");
    scanf_s("%d",&number);
    if(number<0)number=-number;
    do{
    number=number/10;
    count++;
    }while(number!=0);
    printf("It contains %digits.\n",count);
    return 0;
  
    }

posted on 2013-10-07 11:40  haha1235  阅读(107)  评论(0编辑  收藏  举报