Pagini recente » Cod sursa (job #2487366) | Cod sursa (job #1108927) | Cod sursa (job #1604479) | Cod sursa (job #177192) | Cod sursa (job #2336413)
//program text;
//uses crt;
var f : textfile;
text : string;
i, nrCuv, l : integer;
begin
assign(f, 'text.in');
reset(f);
read(f, text);
close(f);
l := length(text);
nrCuv := 0;
for i:=1 to length(text) do
begin
if not (text[i] in ['a'..'z','A'..'Z']) then l:= l-1;
if ((text[i] = ' ') or (text[i] = '-')) and ((text[i-1] in ['a'..'z','A'..'Z']) or (text[i+1] in ['a'..'z','A'..'Z']))then inc(nrCUV);
end;
{clrscr;
writeln(l);
writeln(nrCuv);
writeln(trunc(l/nrCuv)); }
assign(f, 'text.out');
rewrite(f);
write(f, trunc(l/nrcuv));
close(f);
end.