Pagini recente » Cod sursa (job #650575) | Cod sursa (job #1559363) | Cod sursa (job #290103) | Cod sursa (job #1918826) | Cod sursa (job #135998)
Cod sursa(job #135998)
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,nrl div nrc);
close(g);
end.