Pagini recente » Cod sursa (job #874087) | Cod sursa (job #1490144) | Cod sursa (job #214720) | Cod sursa (job #133539) | Cod sursa (job #236809)
Cod sursa(job #236809)
program pascal;
var f,g:Text; nr,lung,p:int64; c:char;
procedure citire;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
nr:=0;
lung:=0;
p:=0;
while not eof(f) do
begin
read(f,c);
if ((ord(c)>96) and (ord(c)<123)) or ((ord(c)>64) and (ord(c)<91)) then
begin
lung:=lung+1;
p:=p+1;
end
else
if p<>0 then
begin
nr:=nr+1;
p:=0;
end;
end;
p:=lung div nr;
write(g,p);
close(f);
close(g);
end;
begin
citire;
end.