Pagini recente » Cod sursa (job #2731097) | Cod sursa (job #2870470) | Cod sursa (job #2689113) | Cod sursa (job #984146) | 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.