Pagini recente » Cod sursa (job #690823) | Cod sursa (job #2540296) | Cod sursa (job #3247522) | Cod sursa (job #851604) | Cod sursa (job #293904)
Cod sursa(job #293904)
var f,g:text;
lunglit,nrcuv:longint;
o,p:boolean;
i,x:char;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
lunglit:=0;
nrcuv:=0;
while not eof(f) do begin
p:=false;
read(f,x);
for i:='A' to 'Z' do if x=i then p:=true;
for i:='a' to 'z' do if x=i then p:=true;
if p then inc(lunglit)
else if (x=' ')or(x='-')and(lunglit<>0) then inc(nrcuv);
end;
o:=false;
for i:='A' to 'Z' do if x=i then o:=true;
for i:='a' to 'z' do if x=i then o:=true;
if not o then inc(nrcuv);
write(g,lunglit div nrcuv);
close(f);
close(g);
end.