Пример #1
0
        static void Main(string[] args)
        {
            DIEM a = new DIEM(); a.nhap(); a.hien();
            DIEM b = new DIEM(); b.nhap(); b.hien();

            Console.WriteLine("khoang cach la" + a.khoangcach(b));
            Console.ReadKey();
        }
Пример #2
0
 public double khoangcach(DIEM b)
 {
     return(Math.Sqrt(Math.Pow(b.x - this.x, 2) + Math.Pow(b.y - this.y, 2)));
 }