Cod sursa(job #738614)

Utilizator paul777Astalas Paul paul777 Data 21 aprilie 2012 08:59:45
Problema Text Scor 20
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.3 kb
var x,y,z,n:integer;f,g:text;w:char;
begin
assign(f,'text.in');reset(f);assign(g,'text.out');rewrite(g);x:=0;y:=0;z:=0;
while not eof(f) do
begin
read(f,w);n:=ord(upcase(w));
if (n>65)and(n<90)then begin x:=x+1;
if y=0 then inc(z);y:=1;end else y:=0;
end;
write(g,x div z);close(f);close(g);end.