Pagini recente » Cod sursa (job #2910070) | Cod sursa (job #1219435) | Cod sursa (job #315808) | Cod sursa (job #2626633) | Cod sursa (job #136010)
Cod sursa(job #136010)
var ok:boolean;
f,g:text;
nrl,nrc:longint;
x:char;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
nrl:=0;nrc:=0;ok:=false;
while not eoln(f) do begin
read(f,x);
if x in ['a'..'z','A'..'Z'] then begin inc(nrl);ok:=true; end
else if (x<>'-') and (ok=true) then begin inc(nrc);ok:=false;end;
end;
if x in ['a'..'z','A'..'Z'] then inc(nrc);
writeln(g,trunc(nrl/nrc));
close(g);
end.