Cod sursa(job #344847)

Utilizator dcupsaoCupsa Darius dcupsao Data 31 august 2009 19:41:33
Problema Text Scor 20
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.41 kb
var a,b:char;
i,j:longint;
f,g:text;

begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
read(f,b);
while not eof(f) do
begin
read(f,a);
if (ord(a)>=97)and(ord(a)<=122) or (ord(a)>=60)and(ord(a)<=90) then inc(i)
else begin
read(f,b);
if (ord(b)>=97)and(ord(b)<=122) or (ord(b)>=60)and(ord(b)<=90)  then begin inc(j); inc(a); end;
end;
end;
write(g,i div j);
close(f);
close(g);
end.