| 1 |
using System;
|
| 2 |
class Program {
|
| 3 |
static void Main() {
|
| 4 |
int n = Convert.ToInt32(Console.ReadLine());
|
| 5 |
int count = 0;
|
| 6 |
while (n != 0) {
|
| 7 |
n /= 10; // краткая запись n = n / 10
|
| 8 |
count++;
|
| 9 |
}
|
| 10 |
Console.WriteLine(n + " contains " + count + " digits");
|
| 11 |
}
|
| 12 |
}
|