Pagini recente » Cod sursa (job #1130112) | Cod sursa (job #3266087) | Cod sursa (job #2903979) | Cod sursa (job #2018987) | Cod sursa (job #796370)
Cod sursa(job #796370)
var f,q:text;
nrc,nrs:int64;
x,ax:char;
ok:boolean;
begin
assign(f,'text.in');
reset(f);
assign(q,'text.out');
rewrite(q);
while not eof(f) do
begin
read(f,x);
if (x in ['a'..'z']) or (x in ['A'..'Z']) then begin
nrs:=nrs+1;
ok:=true;
while ok=true do
begin
read(f,ax);
if (ax in ['a'..'z']) or (ax in ['A'..'Z']) then nrs:=nrs+1
else begin
nrc:=nrc+1;
ok:=false;
end;
end;
end;
end;
write(q,nrs div nrc);
close(f);
close(q);
end.