static void Main(string[] args)
        {
            Console.WriteLine("Введите степень многочлена:");
             int degree = Convert.ToInt16(Console.ReadLine());
             int[] a = new int[degree+1];
             for (int i = 0; i <= degree; i++)
             {
            Console.WriteLine("Введите коэффициент:");
            a[i] = Convert.ToInt16(Console.ReadLine());
             }

             Multinomial prim = new Multinomial(a);
             Console.WriteLine((string)prim);

             Console.WriteLine("Введите степень многочлена:");
             degree = Convert.ToInt16(Console.ReadLine());
             a = new int[degree + 1];
             for (int i = 0; i <= degree; i++)
             {
            Console.WriteLine("Введите коэффициент:");
            a[i] = Convert.ToInt16(Console.ReadLine());
             }

             Multinomial prim2 = new Multinomial(a);
             Console.WriteLine((string)prim2);
             Console.WriteLine(prim2.ToString());

             if (prim == prim2)
             {
            Console.WriteLine("Многочлены равны");
             }

             if (prim != prim2)
             {
            Console.WriteLine("Многочлены не равны");
             }
             Console.WriteLine(prim.GetHashCode());
             Console.WriteLine(prim2.GetHashCode());
             Console.ReadLine();
        }
 public void toStringTest()
 {
     Multinomial prim = new Multinomial(1, 2, 3, 4);
      string a = "1X(3)+2X(2)+3X+4";
      Assert.AreEqual(a, (string)prim);
 }
 public void Test6()
 {
     Multinomial prim = new Multinomial(2, 3, 4, 5);
      Multinomial prim2 = new Multinomial(1, 2, 3, 4);
      Assert.AreEqual(prim.Equals(prim2), false);
 }
 public void Test5()
 {
     Multinomial prim = new Multinomial(1, 2, 3, 4);
      Multinomial prim2 = new Multinomial(1, 2, 3, 4);
      Assert.AreEqual(prim.Equals(prim2), true);
 }
 public void Test4()
 {
     Multinomial prim = new Multinomial(2, 3, 4, 5);
      Multinomial prim2 = new Multinomial(1, 2, 3, 4);
      Assert.AreEqual(prim != prim2, true);
 }
 public void Test3()
 {
     Multinomial prim = new Multinomial(1, 2, 3, 4);
      Multinomial prim2 = new Multinomial(1, 2, 3, 4);
      Assert.AreEqual(prim != prim2, false);
 }
 public void IndexTest()
 {
     Multinomial prim = new Multinomial(1,2,3,4);
      int a = prim[2];
      Assert.AreEqual(a, 3);
 }