Онлайн компилятор C

#include <stdio.h> int main() { int n, count = 0; scanf("%d", &n); while (n != 0) { count++; } printf("%d", count); return 0; }
1) This code is intended to count the number of digits in an integer input by the user. However, it has a logical error that causes an infinite loop.  

2) Hint 1: The variable `n` never changes inside the loop, so the condition `n != 0` will always be true.  
   Hint 2: To count digits correctly, you need to modify `n` inside the loop (e.g., by dividing it by 10).