Pagini recente » Cod sursa (job #3248799) | Cod sursa (job #2400456) | Cod sursa (job #2583950) | Cod sursa (job #2452904) | Cod sursa (job #140175)
Cod sursa(job #140175)
program p21;
var f,g:text;
q,c:char;
r,nrm,nrc:longint;
ok:boolean;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
nrm:=0;
nrc:=0;
while not eof(f) do
begin
q:=c;
read(f,c);
if q=c then ok:=true
else ok:=false;
if c=' ' then nrc:=nrc+1
else if c in ['A'..'Z','a'..'z'] then nrm:=nrm+1;
end;
nrc:=nrc+1;
r:=nrm div nrc;
if ok=true then writeln(g,r+1)
else writeln(g,r);
close(g);
end.