Created
April 1, 2017 08:35
-
-
Save Aathi03/b4a6f9776bdafdd6634a276e10a205d4 to your computer and use it in GitHub Desktop.
counting number of digits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int a,count=0; | |
printf("enter the input number"); | |
scanf("%d",&a); | |
while(a!=0) | |
{ | |
a=a/10; | |
count++; | |
} | |
printf("\nNo of digits=%d",count); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment