Pagini recente » Cod sursa (job #3277250) | Cod sursa (job #2904890) | Cod sursa (job #3322240) | Cod sursa (job #1374464) | Cod sursa (job #866772)
Cod sursa(job #866772)
var f,g:text;
lit: char;
ok: boolean;
l,cuv:integer;
x:real;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
while not(eof(f)) do
begin
read(f,lit);
if ((lit>='A') and (lit<='Z')) or ((lit>='a') and (lit<='z')) then
begin
l:=l+1;
ok:=true;
end
else
begin
if ok then cuv:=cuv+1;
ok:=false;
end;
end;
x:=l/cuv;
write(g,trunc(x));
close(f);
close(g);
end.