SHARE
TWEET

Untitled

a guest Sep 12th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program lab1_1;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. {$R *.res}
  6. uses
  7.   System.SysUtils, Math;
  8.  
  9. var
  10.   ValueX, ValueY: double;
  11.   IsCorrect: Boolean;
  12. begin
  13. IsCorrect := False;
  14.   repeat
  15.       try
  16.         Writeln('Enter the X coordinate of point M');
  17.         Readln(ValueX);
  18.         Writeln('Enter the Y coordinate of point M');
  19.         Readln(ValueY);
  20.         IsCorrect := True;
  21.       except
  22.         Writeln('You did not enter a coordinate, try again.');
  23.       end;
  24.   until (IsCorrect);
  25.   if (Power((ValueX - 1), 2) + Power((ValueY - 1), 2) <= 1) then
  26.       begin
  27.       Writeln('The point belongs to the closed set D');
  28.       end
  29.   else
  30.       begin
  31.       Writeln('The point NOT belongs to the closed set D');
  32.       end;
  33. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top