Pagini recente » Cod sursa (job #169280) | Cod sursa (job #1993488) | Cod sursa (job #2682197) | Cod sursa (job #2124608) | Cod sursa (job #758541)
Cod sursa(job #758541)
program textaha;
var f,g:text;
s:ansistring;
i,litere,cuvinte:longint;
begin
assign (f,'text.in'); reset (f);
assign (g,'text.out'); rewrite (g);
read (f,s);
litere:=0;
cuvinte:=0;
for i:=1 to length (S) do
begin
if (s[i]>='A') and (s[i]<='z') then
inc(litere);
if (i<>1) and ((s[i]<'A') or (s[i]>'z')) and ((s[i-1]>='A') and (s[i-1]<='z')) then
inc(cuvinte);
end;
if (s[length (s)]>='A') and (s[length(s)]<='z') then
inc(cuvinte);
write (G,trunc(litere/cuvinte));
close (F); close (G);
end.