Pagini recente » Cod sursa (job #20530) | Cod sursa (job #2962664) | Cod sursa (job #2709522) | Cod sursa (job #2610100) | Cod sursa (job #38339)
Cod sursa(job #38339)
program text;
var s:string;
l,c:integer;
procedure afisare;
var i:integer;
begin
assign(output,'text.out');
rewrite(output);
i:=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.