Извините, что-то я не заметил, что в задании на Паскале надо было написать, поэтому сначала на Питоне написал.
Вот на Паскале:
program HW;
var r,x,y: real;
var chk:string;
begin
write('Введите радиус: '); readln(r);
r := abs(r);
write('Введите X координату точки: '); readln(x);
write('Введите Y координату точки: '); readln(y);
if (x>=0) and (abs(x)<=r) and (y>=0) and (abs(y)<=r) then chk := 'ВХОДИТ'
else if (x<=0) and (abs(x)<=r) and (y<=0) and (abs(y)<=r) then chk := 'ВХОДИТ'
else if (x<=0) and (abs(x)<=r) and (y>=0) and (abs(y)<=r) and (y<=-1*sqrt(sqr(r)-sqr(x+r))+r) then chk := 'ВХОДИТ'
else if (x>=0) and (abs(x)<=r) and (y<=0) and (abs(y)<=r) and (y>=sqrt(sqr(r)-sqr(x-r))-r) then chk := 'ВХОДИТ'
else chk := 'НЕ ВХОДИТ';
writeln('Точка с координатам (', x:1:1, ', ', y:1:1, ') ', chk, ' в выделенную область.');
end.
А это то же на Питоне, вдруг пригодится:
import math
r = abs(float(input("Введите радиус: ")))
x = float(input("Введите X координату точки: "))
y = float(input("Введите Y координату точки: "))
if x>=0 and abs(x)<=r and y>=0 and abs(y)<=r: chk = 'ВХОДИТ'
elif x<=0 and abs(x)<=r and y<=0 and abs(y)<=r: chk = 'ВХОДИТ'
elif x<=0 and abs(x)<=r and y>=0 and abs(y)<=r and y<=-1*math.sqrt(r**2-(x+r)**2)+r: chk = 'ВХОДИТ'
elif x>=0 and abs(x)<=r and y<=0 and abs(y)<=r and y>=math.sqrt(r**2-(x-r)**2)-r: chk = 'ВХОДИТ'
else: chk = 'НЕ ВХОДИТ'
print("Точка с координатам (%.1f, %.1f) %s в выделенную область." % (x, y, chk))
Код программы:
#include <iostream>
#include <locale>
#include <time.h>
using namespace std;
void rand_mas(int *mas, int n) {
srand(time(NULL));
int a = -30, b = 30;
for (int i = 0; i < n; i++)
mas[i] = a + rand() % (b - a);
}
int min_mas(int *mas, int n) {
int min = mas[0];
for (int i = 1; i < n; i++) {
if (min > mas[i])
min = mas[i];
}
return min;
}
int main()
{
setlocale(LC_ALL, "Russian");
int *A, N, min, *temp;
cout << "Введите количество элементов в массиве" << endl;
cin >> N;
A = new int[N];
rand_mas(A, N);
cout << "Исходный массив: " << endl;
for (int i = 0; i < N; i++)
cout << A[i] << ' ';
min = min_mas(A, N);
temp = A;
A = new int[N + 1];
A[0] = min;
for (int i = 1, j = 0; i < N; i++) {
if (temp[j] == min) {
++j;
A[i] = temp[j];
++j;
continue;
}
A[i] = temp[j];
++j;
}
cout << "\nИзмененный массив: " << endl;
for (int i = 0; i < N; i++)
cout << A[i] << ' ';
return 0;
}
Program gg;
Var i,s: integer;
Begin
For i:=10 to 50 do
if i mod 2=0 then s:=s+i;
Writeln('Сумма всех четных чисел от 10 до 50 равна ',s)
end.