Mai intai trebuie sa te autentifici.
Cod sursa(job #215734)
Utilizator | Data | 20 octombrie 2008 17:32:19 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.67 kb |
var
s: string;
lcuv,stot,ct,nrcuv: integer;
f,g: text;
ok: boolean;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
readln(f,s);
close(f);
ok:=false;
ct:=1; nrcuv:=0; stot:=0; ok:=false;
while ct<>length(s) do
begin
if ((s[ct]<='z') and (s[ct]>='a')) or ((s[ct]<='Z') and (s[ct]>='A'))
then begin
inc(lcuv);
inc(stot);
ok:=true;
end;
if ok=false then inc(nrcuv);
lcuv:=0;
inc(ct);
ok:=false;
end;
write(g,trunc(stot/nrcuv));
close(g);
end.