Cod sursa(job #503692)

Utilizator farcas.ionutfarcas ionut farcas.ionut Data 24 noiembrie 2010 14:46:06
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.33 kb

var n,i,j,k:qword; c:char;
f:text;
begin
assign(f,'text.in');
reset(f);
n:=0;
j:=0;
k:=0;
repeat
read(f,c);
i:=ord(upcase(c));
if (i<65)or(i>90) then k:=0
else begin
n:=n+1;
if k=0 then begin
j:=j+1;
k:=1;
end;
end;
until eof(f);
close(f);
assign(f,'text.out');
rewrite(f);
write(f,n div j);
close(f);
end.