Pagini recente » Cod sursa (job #713860) | Cod sursa (job #2554947) | Cod sursa (job #2350251) | Cod sursa (job #2138324) | Cod sursa (job #670872)
Cod sursa(job #670872)
program pro;
uses crt;
var s,n:integer;
ok:boolean;
ch:char;
fi,fo:text;
begin
assign(fi,'text.in');
reset(fi);
assign(fo,'text.out');
rewrite(fo);
while not eof(fi) do
begin
read(fi,ch);
if (ch>='a') and (ch<='z') or (ch>='A') and (ch<='Z')
then begin
inc(s);
ok:=true;
end
else if ok then begin inc(n);
ok:=false;
end;
end;
writeln(fo,s div n);
close(fi);
close(fo);
end.