Cod sursa(job #836747)

Utilizator IronKingqwerty xxx IronKing Data 16 decembrie 2012 18:20:33
Problema Text Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.38 kb
Var f,g:text;
    a:char;
    b,i,c:integer;

Begin
assign(f, 'text.in');reset(f);
assign(g, 'text.out');rewrite(g);
while eof(f)=false do
  begin
    read(f, a);
    case a of
      'a'..'z','A'..'Z':inc(b);
    end;
    inc(i);
    if i>=2 then
      case a of
        '-',' ':inc(c);
      end;
    end;
write(g, b,' ',c,' ',trunc(b/c));
close(f);
close(g);
End.