C Program to count the number of digits in the entered number

This program displays the number of digits present in the number that is entered through the input.

#include<stdio.h>
#include<conio.h>

void main()

{
unsigned long int num;
int i=0;
clrscr();
printf(“Enter the digit\n”);
scanf(“%lu”,&num);
while(num!=0)
{
num=num/10;
++i;
}
printf(“Length=%d”,i);
getch();
}

23 Responses to “C Program to count the number of digits in the entered number”

  1. information technology

    Nov 12. 2010

    found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later

    Reply to this comment
  2. auto shop

    Nov 14. 2010

    Thanks for an idea, you sparked at thought from a angle I hadn’t given thoguht to yet. Now lets see if I can do something with it.

    Reply to this comment
  3. Suzie Diniz

    Nov 18. 2010

    I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work Look forward to reading more from you in the future.

    Reply to this comment
  4. Ron Tedwater

    Nov 18. 2010

    Really nice post,thank you

    Reply to this comment
  5. Swiss Ball Exercises

    Nov 24. 2010

    Valuable info. Lucky me I found your site by accident, I bookmarked it.

    Reply to this comment
    • rc

      Nov 24. 2010

      Thanks a lot..

      keep reading and refer it to your friends and known ones:)

      Reply to this comment
  6. pharmacist

    Nov 26. 2010

    Superb blog post, I have book marked this internet site so ideally I’ll see much more on this subject in the foreseeable future!

    Reply to this comment
    • rc

      Nov 26. 2010

      thanks for the motivation..

      keep reading..

      do subscribe:)

      register yourself and refer this site to others..:)

      Reply to this comment
  7. maria andros

    Dec 07. 2010

    Thanks for the post, keep posting stuff

    Reply to this comment
  8. My sister gave me address to this site, thanks!

    Reply to this comment
  9. again Very interesting blog post. shared it to my friends.

    Reply to this comment
  10. celebrity photos

    Dec 16. 2010

    This is a superb post Ethical Hacking .
    Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

    Reply to this comment
  11. desktop wallpaper

    Jan 02. 2011

    In my offered opnion that even though it was undoubtedly a evaluated article I have come to the conclusion that there were still points to be made. I would like to hear your thoughts..and that of your other readers and whether or not they have come to the same conclusion. Cheers

    Reply to this comment
    • rc

      Jan 04. 2011

      would u please guide and tell us the missing points…

      we would love to hear them:)

      Reply to this comment
  12. Blair Horenstein

    Jan 20. 2011

    what great understand.

    Reply to this comment
  13. Sharita Mingrone

    Jan 21. 2011

    Constantly an awesome place once i drop by this blog and various sites you possess. Value the remarks.

    Reply to this comment
  14. Eugena Wisser

    Jan 22. 2011

    what great read.

    Reply to this comment
  15. wise banter

    Nov 14. 2012

    can u help me on this program please;

    the user should input 12.25,4
    the output should be 5 digits 1 full stop and 1 comma.
    THANKS

    Reply to this comment

Leave a Reply