var
arr: array [1..20] of string[255];
ch,c: Char;
count,d,a,i,o: Integer;
st,s: String;
t: text;
fs: file of string[255];
begin
a:=0; o:=0; count:=0;
assign(t,'ban.dat');
assign(fs,'words.dat');
reset(t);
rewrite(fs);
while not eof(t) do begin
Inc(a);
readln(t,arr[a]);
end;
for ch:='a' to 'z' do begin
for d:=1 to 20 do begin
st:=arr[d];
if not (st='') then begin
repeat
inc(o);
if st[o]=ch then begin inc(count); end;
until o=length(st);
o:=0;
end else Break;
end;
if not (count=0) then begin
str(count,s);
s:='Word '+ch+' - '+s+' raz.';
write(fs,s);
count:=0;
end else count:=0; Continue;
end;
var
cnt: array['a' .. 'z'] of integer;
s: string;
i: integer;
ch: char;
f, r: text;
begin
assign(f, 'text.txt'); reset(f);
assign(r, 'letter.txt'); rewrite®;
while not eof(f) do begin
readln(f, s);
for i := 1 to length(s) do
if s[i] in ['a' .. 'z'] then inc(cnt[s[i]]);
end;
close(f);
for ch := 'a' to 'z' do
if cnt[ch] > 0 then writeln(r, ch:2, ': ', cnt[ch]:3, '':3);
close®;
end.
var
arr: array [1..20] of string;
ch,c: Char;
count,d,a,i,o: Integer;
st,s: String;
t: text;
fs:text;
begin
a:=0; o:=0; count:=0;
assign(t,'asd.txt');
assign(fs,'asdf.txt');
reset(t);
rewrite(fs);
while not eof(t) do begin
Inc(a);
readln(t,arr[a]);
end;
for ch:='a' to 'z' do begin
for d:=1 to 20 do begin
st:=arr[d];
if not (st='') then begin
repeat
inc(o);
if st[o]=ch then begin inc(count); end;
until o=length(st);
o:=0;
end;
end;
if not (count=0) then begin
str(count,s);
s:=ch+' - '+s;
writeln(fs,s);
count:=0;
end else count:=0;
end;
end.
var
arr: array [1..20] of string;
ch,c: Char;
count,d,a,i,o: Integer;
st,s: String;
t: text;
fs:text;
begin
a:=0; o:=0; count:=0;
assign(t,'ban.dat');
assign(fs,'words.dat');
reset(t);
rewrite(fs);
while not eof(t) do begin
Inc(a);
readln(t,arr[a]);
end;
for ch:='a' to 'z' do begin
for d:=1 to 20 do begin
st:=arr[d];
if not (st='') then begin
repeat
inc(o);
if st[o]=ch then begin inc(count); end;
until o=length(st);
o:=0;
end;
end;
if not (count=0) then begin
str(count,s);
s:=ch+' - '+s;
writeln(fs,s);
count:=0;
end else count:=0;
end;
close(t);
close(fs);
readln