Var r,x,y: real; k:integer;
begin
write('R = ');
readln(r);
write('x, y: ');
readln(x,y);
k:=0;
while (x<>0) and (y<>0) do
begin
if (x*x+y*y<=r*r) then k:=k+1;<br> write('x, y: ');
readln(x,y);
end;
writeln('k = ',k);
end.
Пример:
R = 3
x, y: 2 3
x, y: 2 1
x, y: -2.5 -2.5
x, y: -1 -1
x, y: -2 2
x, y: 0 0
k = 3