Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program project1;
- {$APPTYPE CONSOLE}
- {$R *.res}
- uses
- System.SysUtils;
- var
- X, Y : double;
- IsCorrect : Boolean;
- begin
- IsCorrect := FALSE;
- writeln ('Введите числа X и Y');
- repeat
- try
- readln (X);
- readln (Y);
- IsCorrect := TRUE;
- except
- writeln ('Ошибка ввода');
- end;
- until (IsCorrect);
- if (Y >= 0) and (Y <= 1 - Abs(X)) or
- (Y >= -1) and (Y < 0) and (X >= -1) and (X <= 1) then
- writeln ('Принадлежит')
- else
- writeln ('Не принадлежит');
- readln (X)
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement