niromru

ПР2 З6

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