Cod sursa(job #524916)

Utilizator richforthegunioana ghita richforthegun Data 23 ianuarie 2011 16:25:58
Problema Text Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.43 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 begin
                        if s[i] in ['a'..'z','A'..'Z'] then j:=j+1
                        else if (s[i-1] in ['a'..'z','A'..'Z']) and  (s[i] in ['a'..'z','A'..'Z'])then c:=c+1;
                        end;

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