Pagini recente » Cod sursa (job #180796) | Cod sursa (job #2848888) | Cod sursa (job #686102) | Cod sursa (job #2037037) | Cod sursa (job #291592)
Cod sursa(job #291592)
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.