Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp2
  8. {
  9.     class Program
  10.     {
  11.         class Point
  12.         {
  13.             double x, y;
  14.             public double[] GetCoordinates
  15.             {
  16.                 get {
  17.                     double[] coor = new double[2];
  18.                     coor[0] = x;
  19.                     coor[1] = y;
  20.                     return coor;
  21.                 }
  22.  
  23.             }
  24.            public Point ()
  25.             {
  26.                 x = y = 0;
  27.             }
  28.             public Point(double x,double y)
  29.             {
  30.                 this.x = x;
  31.                 this.y = y;
  32.             }
  33.         }
  34.         public double Length (double [] coor)
  35.         {
  36.             double x, y, length;
  37.             Point point = new Point();
  38.             length = Math.Sqrt((coor[0] - x) * (coor[0] - x) + (coor[1] - y) * (coor[1] - y));
  39.             return length;
  40.         }
  41.            
  42.         class Triangle
  43.         {
  44.  
  45.         }
  46.         static void Main(string[] args)
  47.         {
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement