Pagini recente » Borderou de evaluare (job #224730) | Cod sursa (job #558341) | Cod sursa (job #1611205) | Cod sursa (job #276122) | Cod sursa (job #601342)
Cod sursa(job #601342)
Program texte;
var ch:char;
suma,cuvinte:longint;
f:text;
begin
assign(f,'text.in'); reset(F);
suma:=0; cuvinte:=0;
while not eof(f) do begin
read(f,ch);
if ((ch>='a')and(ch<='z'))or((ch>='A')and(ch<='Z')) then
begin
inc(cuvinte);
while ((ch>='a')and(ch<='z'))or((ch>='A')and(ch<='Z')) do
begin
inc(suma);
read(f,ch);
end;
end;
end;
close(f); assign(f,'text.out'); rewrite(f);
writeln(f,suma div cuvinte); close(f);
end.