Pagini recente » Cod sursa (job #2829272) | Cod sursa (job #2519859) | Cod sursa (job #945203) | Cod sursa (job #2716008) | Cod sursa (job #1089311)
var c :char;
k,l,i,j : longint;
begin
assign(input,'text.in'); reset(input);
assign(output,'text.out'); rewrite(output);
i:=1;
while not eof(input) do begin
read(c);
j:=1;
if (ord(c)>=65) and (ord(c)<=90) then l:=l+1;
if (ord(c)>=97) and (ord(c)<=122) then l:=l+1;
if (i=1) and (c='-') then i:=i+1
else if (i<>1) and (c='-') then k:=k+1;
if (i=1) and (c<>' ') and (c<>'-') then k:=k+1;
IF c=' ' THEN k:=k+1;
if (c='.') or (c='!') or (c='?') then i:=1;
end;
writeln(l div k);
close(input); close(output);
end.