Pagini recente » Cod sursa (job #372944) | Cod sursa (job #777963) | Cod sursa (job #1690499) | Cod sursa (job #1529868) | Cod sursa (job #1591290)
Program text1;
Var fi,fo:text;
s:ansistring;
i,k,m:integer;
Const mici:set of char=['a'..'z'];
mari:set of char=['A'..'Z'];
Begin
assign(fi,'text.in');
assign(fo,'text.out');
reset(fi);
s:=' ';
while not(eof(fi)) do read(fi,s);
close(fi);
rewrite(fo);
for i:=1 to length(s) do begin
if (s[i] in mici)or(s[i] in mari) then inc(k);
if (s[i]='-')or(s[i]=' ') then inc(m);
end;
if (s[1]='-')and(s[2]=' ') then dec(m,2);
if (s[1]=' ')and(s[2]='-') then dec(m,2);
Write(fo,k div(m+1) );
close(fo);
end.