public static void Main()
char[] obsNames = new char[4] { 'A', 'B', 'C', 'V' };
int[] obsParam = new int[4];
for (int i = 0; i < obsParam.Length; i++)
Console.Write(obsNames[i] + "? ");
obsParam[i] = int.Parse(Console.ReadLine());
int[] obsRes = ObvodObsah(obsParam);
Console.WriteLine("Obvod = " + obsRes[0].ToString());
Console.WriteLine("Obsah = " + obsRes[1].ToString());
public static int[] ObvodObsah(int[] obsP)
return new int[2] { obsP[0] + obsP[1] + obsP[2], (obsP[0] * obsP[3]) / 2 };