Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lab1;
- var
- a, b, x0, xl, xr, y, ys: real;
- begin
- read(x0, a, b, xl, xr, y);
- ys := sqrt(sqr(b) - (sqr(b) * sqr(((xr + xl) / 2) - x0)) / sqr(a));
- if xl < (x0 - a) then
- if xr < (x0 - a) then
- write('Не пересекаются')
- else if xr = (x0 - a) then
- write('Касание')
- else
- write('Пересекаются') else if xl > (x0 + a) then
- write('Не пересекаются')
- else if xr > (x0 + a) then
- write('Пересекаются')
- else if (xl = (x0 - a)) and (xr = (x0 + a)) and (y = ys) then
- write('Внутреннее касание трех точек')
- else if (xl = (x0 - a)) and (xr = (x0 + a)) then
- write('Внутреннее касание двух вершин при основании')
- else if (xl = (x0 - a)) and (y = ys) then
- write('Внутреннее касание левой и верхней точки')
- else if (xr = (x0 + a)) and (y = ys) then
- write('Внутреннее касание правой и верхней точки')
- else if xl = (x0 - a) then
- write('Внутреннее касание левой точки')
- else if xr = (x0 + a) then
- write('Внутреннее касание правой точки')
- else if y = ys then
- write('Внутреннее касание верхней точкой')
- else if y > ys then
- write('Пересекаются')
- else
- write('Не пересекаются') ;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement