Помогите решить эти 16 вариантов, или хотя бы несколько. Что нужно сделать: Составить программу в Pascal ABC( Нужно сделать так, чтобы вы вводили координаты х и у и программа проверяет, подходит ли эта точка к графику или нет. Пример на 2 фото.
Очень нужно. 80 баллов
Answers & Comments
begin
write('x = ');
read(x);
write('y = ');
read(y);
{1}
if (y >= x + 3) and (x <= 0) and (sqr(x + 1) + sqr(y - 2) <= sqr(2)) or
(x >= 0) and (y <= -x + 3) and (sqr(x + 1) + sqr(y - 2) <= sqr(2)) then
writeln('1: YES')
else
writeln('1: NO');
{2}
if (y <= 2) and (y >= 0) and (sqr(x - 3) + sqr(y) >= sqr(1)) or
(y <= 0) and (sqr(x - 3) + sqr(y) <= sqr(1)) then
writeln('2: YES')
else
writeln('2: NO');
{3}
if (y >= 0) and (y <= x + 1) and (y <= -x + 2) or
(y >= 0) and (y <= x - 2) then
writeln('3: YES')
else
writeln('3: NO');
{4}
if (sqr(x - 2) + sqr(y) >= sqr(1)) and (sqr(x - 2) + sqr(y) <= sqr(2)) and
((x - 2) * y >= 0) then
writeln('4: YES')
else
writeln('4: NO');
{5}
if (sqr(x) + sqr(y) <= sqr(2)) and ((y <= x - 2) or (y >= x + 2)) then
writeln('5: YES')
else
writeln('5: NO');
{6}
if (sqr(x - 2) + sqr(y - 2) >= sqr(1)) and (y <= x + 2) and
(y >= -x + 2) and (y >= x - 2) and (y <= -x + 6) then
writeln('6: YES')
else
writeln('6: NO');
{7}
if (y <= 2) and (y >= -2) and (sqr(x) + sqr(y) >= sqr(1)) and
(sqr(x - 2) + sqr(y) >= sqr(1)) and (sqr(x - 2) + sqr(y) >= sqr(1)) then
writeln('7: YES')
else
writeln('7: NO');
{8}
if (sqr(x - 2) + sqr(y) <= sqr(2)) and (sqr(x - 2) + sqr(y) >= sqr(1)) and
(sqr(x - 2) + sqr(y + 2) <= sqr(2)) then
writeln('8: YES')
else
writeln('8: NO');
{9}
if (y <= 3) and (y >= 0) and (y >= x) and (y >= -x + 3) or
(y <= 3) and (y >= 0) and (y <= x) and (y <= -x + 3) then
writeln('9: YES')
else
writeln('9: NO');
{10}
if ((sqr(x - 3) + sqr(y) <= sqr(2)) and (sqr(x - 3) + sqr(y) >= sqr(1)) or
(sqr(x - 3) + sqr(y) <= sqr(4)) and (sqr(x - 3) + sqr(y) >= sqr(3))) and
(y >= 0) then
writeln('10: YES')
else
writeln('10: NO');
{11}
if (y <= 2) and (y >= -2) and (x >= -2) and (x <= 2) and
(sqr(x - 2) + sqr(y - 2) >= sqr(1)) then
writeln('11: YES')
else
writeln('11: NO');
{12}
if (y <= 3) and (y >= 1) and (x >= 1) and (x <= 5) and
(sqr(x - 3) + sqr(y - 2) >= sqr(1)) then
writeln('12: YES')
else
writeln('12: NO');
{13}
if (y <= 0) and (y >= -3) and (x >= -1) and (x <= 1) or
(y <= x + 2) and (y <= -x + 2) and (y >= 0) then
writeln('13: YES')
else
writeln('13: NO');
end.
Последние 3, я думаю, можно оставить Вам)