Pagini recente » Cod sursa (job #1613067) | Cod sursa (job #2980500) | Cod sursa (job #1464174) | Cod sursa (job #1546264) | Cod sursa (job #758550)
Cod sursa(job #758550)
program textaha;
var f,g:text;
c:char;
i,litere,cuvinte,p:longint;
bufin:array[1..65000] of byte;
begin
assign (f,'text.in'); reset (f);
assign (g,'text.out'); rewrite (g);
settextbuf (f,bufin);
litere:=0;
cuvinte:=0;
while not seekeof (f) do
begin
read (f,c);
if ((c>='a') and (c<='z')) or ((c>='A') and (c<='z')) then
begin
inc(litere);
if p=0 then
begin
p:=1; inc(cuvinte)
end;
end
else
p:=0;
end;
writeln (g,trunc(litere/cuvinte));
close (F); close (G);
end.