Pagini recente » Diferente pentru winter-challenge-1 intre reviziile 3 si 4 | Cod sursa (job #695189) | Cod sursa (job #157300) | Cod sursa (job #1337272) | Cod sursa (job #727817)
Cod sursa(job #727817)
var f:text;
pre,c:char;
flag:boolean;
lit,m:longint;cuv:word;
begin
assign(f,'text.in');
reset(f);
cuv:=0;
flag:=true;
lit:=0;
read(f,c);
while (not eof(f))do
begin
if c in ['a'..'z','A'..'Z'] then begin
inc(lit);
flag:=true;
end
else if flag=true then
begin
inc(cuv);
flag:=false;end;
read(f,c);
if(eof(f))and(flag=true)then inc(cuv);
end;
close(f);
assign(f,'text.out');
rewrite(f);
if(cuv<>0) then begin
m:=lit div cuv;
write(f,m);
end;
close(f);
end.