Pagini recente » Simulare 43 | Cod sursa (job #706626) | Cod sursa (job #2299726) | Cod sursa (job #2849797) | Cod sursa (job #1356782)
program infoarena1;
var f,g:text;
c:char;
litere,cuvinte:longint;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
litere:=0; cuvinte:=0;
while not seekeoln(f) do
begin
read(f,c);
if ((c <= 'z') and (c >= 'a')) or ((c >= 'A') and (c <= 'Z')) then
begin
inc(cuvinte);
while ((c <= 'z') and (c >= 'a')) or ((c >= 'A') and (c <= 'Z')) do
begin
inc(litere);
read(f,c);
end;
end;
end;
writeln(g,litere div cuvinte);
close(f); close(g);
end.