Cod sursa(job #248092)

Utilizator CristianfStanciulescu Cristian-Florinel Cristianf Data 24 ianuarie 2009 21:01:21
Problema Text Scor 40
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.37 kb
type Multime = set of char;
var m:multime;
    c:char;
    f,g:text;
    c1,c2:integer;
begin
assign(f,'text.in');
reset(f);
m:=['a'..'z'];
c1:=0;
c2:=0;
while not eoln(f) do
  begin
  read(f,c);
if c in m then
 inc(c1)
else if (c=' ') or (c='-') then
       inc(c2);
end;
Close(f);
assign(g,'text.out');
rewrite(g);
writeln(g,c1 div c2);
Close(g);
end.