Pagini recente » Cod sursa (job #1093891) | Cod sursa (job #3326818) | Cod sursa (job #2515365) | Cod sursa (job #1691283) | Cod sursa (job #864679)
Cod sursa(job #864679)
var a:char;
lit, cuv:int64;
f,g:text;
m:byte;
ok:boolean;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out'); rewrite(g);
lit:=0; cuv:=0;
ok:=false;
while not eof(f) do
begin
read(f,a);
if (a in ['a'..'z']) or (a in ['A'..'Z']) then begin
ok:=true;
lit:=lit+1;
end
else if ok=true then begin
ok:=false;
cuv:=cuv+1;
end;
end;
m:=lit div cuv;
write(g,m);
close(f);
close(g);
end.