Pagini recente » Borderou de evaluare (job #419390) | Cod sursa (job #642606)
Cod sursa(job #642606)
program tea;
var f,g:text;
s:ansistring;
i:longint;
lit,cuv:longint;
begin
assign (f,'text.in'); reset (f);
assign (g,'text.out'); rewrite (g);
read (f,s);
lit:=0; cuv:=0;
for i:=1 to length (S) do
begin
if (s[i]>='A') and (s[i]<='z') then
lit:=lit+1
else
if ((s[i]<'A') or (s[i]>'z')) and (s[i-1]>='A') and (s[i-1]<='z') and (i>1) then
cuv:=cuv+1;
end;
if (s[length (s)]>='A') and (s[length (S)]<='z') then
cuv:=cuv+1;
write (g,trunc(lit/cuv));
close (f);
close (g);
end.