Cod sursa(job #640385)

Utilizator dia10Orgas Diana dia10 Data 25 noiembrie 2011 16:12:09
Problema Text Scor 10
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.33 kb
const semne=['.','!','?'];
var  s:string;
     f,g:text;
     i,c,n:integer;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
read(f,s);
for i:=1 to length(s) do
if (s[i]=' ') or (s[i] in semne) then
if (s[i-1]<>',') and (s[i-1]<>' ') then c:=c+1;
n:=length(s);
write(g,n/c:4:2);
close(f);
close(g);
end.