Pagini recente » Cod sursa (job #2329728) | Cod sursa (job #1478386) | Cod sursa (job #1324431) | Cod sursa (job #1755632) | Cod sursa (job #121627)
Cod sursa(job #121627)
Program PText;
var c1,c2 : char;
n,l : longint;
f : text;
begin
n:=0;
l:=0;
c1:='*';
assign(f,'text.in');
reset(f);
while not eof(f) do
begin
read(f,c2);
if (c2 in ['A'..'Z','a'..'z']) then
begin
l:=l+1;
if not (c1 in ['A'..'Z','a'..'z']) then n:=n+1;
end;
c1:=c2;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,l div n);
close(f);
end.