Pagini recente » Cod sursa (job #1955839) | Cod sursa (job #1875752) | Cod sursa (job #2737512) | Cod sursa (job #362544) | Cod sursa (job #38337)
Cod sursa(job #38337)
program text;
var s:string;
l,c:integer;
procedure afisare;
var i:integer;
begin
assign(output,'text.out');
rewrite(output);
i:=int(l div c);
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.