public static void Main()
double x1, x2, y1, y2,x3,y3,x4,y4, d,d1,d2,d3, perimeter ;
Console.WriteLine("insert x1 for first point (X1) : " );
x1=double.Parse(Console.ReadLine());
Console.WriteLine("insert y1 for first point (y1) : " );
y1=double.Parse(Console.ReadLine());
Console.WriteLine("--------------------------------- ");
Console.WriteLine("insert x2 for two point (X2) : " );
x2=double.Parse(Console.ReadLine());
Console.WriteLine("insert y2 for two point (y2) : " );
y2=double.Parse(Console.ReadLine());
Console.WriteLine("--------------------------------- ");
Console.WriteLine("insert x3 for three point (X3) : " );
x3=double.Parse(Console.ReadLine());
Console.WriteLine("insert y3 for three point (y3) : " );
y3=double.Parse(Console.ReadLine());
Console.WriteLine("--------------------------------- ");
Console.WriteLine("insert x4 for four point (X4) : " );
x4=double.Parse(Console.ReadLine());
Console.WriteLine("insert y4 for four point (y4) : " );
y4=double.Parse(Console.ReadLine());
d=Math.Sqrt(Math.Pow((x2-x1),2)+Math.Pow((y2-y1),2));
d1=Math.Sqrt(Math.Pow((x3-x2),2)+Math.Pow((y3-y2),2));
d2=Math.Sqrt(Math.Pow((x4-x3),2)+Math.Pow((y4-y3),2));
d3=Math.Sqrt(Math.Pow((x4-x1),2)+Math.Pow((y4-y1),2));
Console.WriteLine("--------------------------------- ");
Console.WriteLine("محيط الشكل الرباعي هو : "+Math.Round(perimeter));