Pagini recente » Cod sursa (job #21970) | Cod sursa (job #1438511) | Cod sursa (job #2563717) | Cod sursa (job #793526) | Cod sursa (job #664369)
Cod sursa(job #664369)
program text1;
var f,g:text;
s:ansistring;
i:longint;
nr,k:longint;
begin
assign (f,'text.in') ; reset (f);
assign (g,'text.out');rewrite (g);
read (f,s);
while (s[1]<'A') or (s[1]>'z') do
delete (S,1,1);
nr:=0; k:=0;
for i:=1 to length (s) do
begin
if (s[i]>'A') and (s[i]<='z') then
nr:=nr+1;
if (i>1) and (s[i-1]>='A') and (s[i-1]<='z') and( (s[i]<'A') or (s[i]>'z')) then
k:=k+1;
end;
if (s[length (S)]>='A') and (s[length (S)]<='z') then
k:=k+1;
write (g,trunc(nr/k));
close (f);
close (g);
end.