├── README.md └── count the number of digits.c /README.md: -------------------------------------------------------------------------------- 1 | # count-the-number-of-digits-C-program 2 | It will calculate count the number of digits using for or while loop 3 | -------------------------------------------------------------------------------- /count the number of digits.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() 3 | { 4 | int a; 5 | int c=0; 6 | scanf("%d",&a); 7 | 8 | while(a!=0){ 9 | a=a/10; 10 | ++c; 11 | } 12 | 13 | printf("%d",c); 14 | } 15 | 16 | --------------------------------------------------------------------------------