program p9_b_1 uses crt var k1 k2 integer begin clrscr write Vvedite n

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
program p9_b_1; {7 B 1.1}
uses crt;
var n, i, k1, k2 : integer;
begin
clrscr;
write('Vvedite naturalnoe chislo n : '); readln(n);
{cherez formulu}
k1 := Trunc(1 + ln(n)/ln(10));
writeln('Kol-vo cifr v.1 : ', k1);
{cherez cikl}
k2 := 0;
for i:= 1 to n do begin
n := n div 10;
k2 := k2 + 1;
if (n = 0) then break;
end;
writeln('Kol-vo cifr v.2 : ', k2);
readln;
end.