Advertisement
zfhridoy47

loop_problem_10

Jun 25th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include<stdio.h>
  2.  int main()
  3.  {
  4.    int n,count;
  5.    scanf("%d", &n);
  6.    count=0;
  7.    while(n)
  8.    {
  9.      n=n/10;
  10.      count++;
  11.    }
  12.    printf("number of digits:%d", count);
  13.    return 0;
  14.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement