public static void Main()
double x1,x2,x3,x4,y1,y2,y3,y4,a1,a2,a3,a4,f1,f2,f3,f4,d;
Console.WriteLine("enter x1");
x1 = double.Parse(Console.ReadLine());
Console.WriteLine("enter x2");
x2 = double.Parse(Console.ReadLine());
Console.WriteLine("enter x3");
x3 = double.Parse(Console.ReadLine());
Console.WriteLine("enter x4");
x4 = double.Parse(Console.ReadLine());
Console.WriteLine("enter y1");
y1 = double.Parse(Console.ReadLine());
Console.WriteLine("enter y2");
y2 = double.Parse(Console.ReadLine());
Console.WriteLine("enter y3");
y3 = double.Parse(Console.ReadLine());
Console.WriteLine("enter y4");
y4 = double.Parse(Console.ReadLine());
a1 = Math.Pow(x2-x1,2)+Math.Pow(y2-y1,2);
a2 = Math.Pow(x3-x2,2)+Math.Pow(y3-y2,2);
a3 = Math.Pow(x4-x3,2)+Math.Pow(y4-y3,2);
a4 = Math.Pow(x1-x4,2)+Math.Pow(y1-y4,2);
Console.WriteLine("The final perimeter is {0}",d);