Cod sursa(job #1299041)

Utilizator SirbuAlexandruSirbu Alexandru SirbuAlexandru Data 23 decembrie 2014 14:19:41
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.34 kb
var
	f:text;
	c,p:char;
	l,n:integer;
begin
	assign(f,'text.in');
	reset(f);
	n:=1;
	l:=0;
	while not eoln(f) do begin
		read(f,c);
		if c in ['a'..'z','A'..'Z'] then
			l:=l+1
		else 
			if p in ['a'..'z','A'..'Z']
				then n:=n+1;
		p:=c;
	end;
	close(f);
	assign(f,'text.out');
	rewrite(f);
	write(f,l div n);
	close(f);
end.