uses crt var ch char counts array of integer begin for ch to do begin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
uses crt;
var
ch :char;
counts :array ['0'..'9'] of integer;
begin
for ch := '0' to '9' do begin
counts[ch] := 0;
end;
writeln('Vvodite > ');
while (true) do begin
read(ch);
if (ch = '.') then begin
break;
end;
counts[ch] := counts[ch] + 1;
end;
for ch := '0' to '9' do begin
writeln(ch, ' -- ', counts[ch]);
end;
readln;
end.