Pagini recente » Cod sursa (job #1497810) | Cod sursa (job #1654661) | Cod sursa (job #30036) | Cod sursa (job #35610) | Cod sursa (job #769524)
Cod sursa(job #769524)
var a:char; nc,nl:real; buf:array[1..1 shl 18]of char; c:boolean;
begin
assign(input,'text.in'); reset(input); settextbuf(input,buf); c:=false;
while not(seekeof(input)) do begin
read(a);
if (a in['a'..'z']) or (a in['A'..'Z']) then begin
if c then
nl:=nl+1
else begin
c:=true;
nc:=nc+1;
nl:=nl+1;
end end else begin
c:=false;
end;
end;
assign(output,'text.out'); rewrite(output);
if nc>0 then begin nl:=int(nl/nc); write(nl:0:0) end else write('0');
close(output);
end.