Cod sursa(job #867812)

Utilizator infinitiInfiniti infiniti Data 30 ianuarie 2013 10:26:37
Problema Text Scor 40
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.45 kb
program asd;
var c,cb : char;
    f : text;
    lit,cuv : longint;

begin
    cb := ' ';
    assign(f,'text.in'); reset(f);
    while not eoln(f) do begin
        read(f,c);
        if (cb = ' ') and (c <> ' ') then inc(cuv);
        if ((c >= 'a') and (c <= 'z')) or ((c >= 'A') and (c <= 'Z'))
            then inc(lit);
        cb := c;
        end;
    close(f); assign(f,'text.out'); rewrite(f);
    write(f,lit div cuv);
    close(f);
end.