Cod sursa(job #1452984)
Utilizator | Data | 22 iunie 2015 15:37:43 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.98 kb |
var cuv,lit:integer;
f,g:text;
ok:boolean;
c:char;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
ok:=false; lit:=0;cuv:=0;
while not eoln(f) do begin
read(f,c);
if (('a'<=c) and (c<='z'))or(('A'<=c) and (c<='Z')) then begin lit:=lit+1;
lit:=lit+1;
ok:=true;
end
else
begin
cuv:=cuv+1;
ok:=false;
end;
end;
if ok=false then write('0');
write(g,round(lit/cuv));
close(f);
close(g);
end.