Cod sursa(job #151134)
Utilizator | Data | 7 martie 2008 20:39:34 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
program textcuv;
const
alfabet=['a'..'z','A'..'Z'];
var
f:text;
ch:char;
c,l:longint;
begin
assign(f,'text.in');
reset(f);
read(f,ch);
while not eoln(f) do
begin
while not (ch in alfabet) do
read(f,ch);
if not eoln(f) then
inc(c);
while ch in alfabet do
begin
read(f,ch);
inc(l);
end;
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,l div c);
close(f);
end.