Pagini recente » Cod sursa (job #1846707) | Cod sursa (job #2161755) | Cod sursa (job #126480) | Cod sursa (job #1591607) | Cod sursa (job #38346)
Cod sursa(job #38346)
program text;
var s:string;
l,c:integer;
procedure afisare;
var i:integer;
begin
assign(output,'text.out');
rewrite(output);
//if c<>0 then
i:=trunc(l/c)
// else i:=0;
write(i);
close(output);
end;
procedure procesare;
var i:integer;
begin
for i:=1 to length(s) do
if (s[i] in ['A'..'Z','a'..'z']) then
l:=l+1
else if (s[i-1] in ['A'..'Z','a'..'z']) and
not (s[i] in ['A'..'Z','a'..'z']) and (l>=1) then
inc(c);
afisare;
end;
procedure citire;
begin
assign(input,'text.in');
reset(input);
while not eof do
begin
readln(s);
procesare;
end;
close(input);
end;
begin
citire;
end.