Latest Movie :
Home » , » C Program to display the No. of Digits in an Entered Number

C Program to display the No. of Digits in an 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();
}
Share this article :

Post a Comment

Feel Free to Say thanks Comment Here

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. SoftwareLibrary4u - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger