Cod sursa(job #524919)

Utilizator richforthegunioana ghita richforthegun Data 23 ianuarie 2011 16:28:22
Problema Text Scor 40
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.34 kb
var s:string;
f,g:text;
c,j,i:longint;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
readln(f,s);
j:=0; c:=0;
for i:=1 to ord(s[0]) do if s[i] in ['a'..'z','A'..'Z'] then j:=j+1
                        else  if s[i-1] in ['a'..'z','A'..'Z']then c:=c+1;


j:=j div c;
writeln(g,j);
close(f);close(g);
end.