Cod sursa(job #248104)

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