Cod sursa(job #431544)

Utilizator autoplayerBerendea autoplayer Data 1 aprilie 2010 09:47:52
Problema Text Scor 80
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.75 kb
var t : text;
    x, y : word;
    a : char;
begin
assign(t,'text.in');
reset(t);
while not(eof(t)) do begin
                               if eoln(t) then readln(t);
                               read(t,a);
                               if (a in ['a'..'z']) or (a in ['A'..'Z']) then inc(y);
                               while ((a in ['a'..'z']) or (a in ['A'..'Z'])) and not(eoln(t)) do begin inc(x);
                                                                                                           read(t,a);write(a);
                                                                                                     end;
                         end;
close(t);
assign(t,'text.out');
rewrite(t);
writeln(t,x div y);
close(t);
end.