Advertisement
Alex_Fomin

Untitled

Nov 24th, 2015
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.82 KB | None | 0 0
  1. program koor;
  2.  
  3. var
  4.   x1, x2, y1, y2: integer;
  5.   res1, res2: real;
  6.  
  7. begin
  8.   Write('Введите через пробел координаты точки А:');
  9.   Read(x1);
  10.   Read(y1);
  11.   WriteLn;
  12.   Write('Введите через пробел координаты точки B:');
  13.   Read(x2);
  14.   Read(y2);
  15.   WriteLn;
  16.  
  17.   res1 := sqrt(sqr(x1) + sqr(y1));
  18.   res2 := sqrt(sqr(x2) + sqr(y2));
  19.  
  20.   if res1 = res2 then
  21.   begin
  22.     writeln('Точки A и B симметричны отностительно начала координат');
  23.     ReadLn;
  24.     exit;
  25.   end;
  26.  
  27.   if res1 < res2 then
  28.     writeln('Точка А находится ближе к началу координат.')
  29.   else
  30.     writeln('Точка B находится ближе к началу координат.');
  31.  
  32.   Readln;
  33. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement