예제 #1
0
    public void GetAnswer(int Algorithm, int r, Math.Trio ABC,
                          Math.Pair Var1, Math.Pair Var2, Math.Pair MN)
    {
        Clear();

        switch (Algorithm)
        {
        case 1: PrintAnswer(Algorithm1(r, ABC.A, ABC.B, ABC.C, Var1.a, Var1.b,
                                       Var2.a, Var2.b, MN.a, MN.b), true, r); break;

        case 2:
            if (Var1 != null)
            {
                PrintAnswer(Algorithm21(r, ABC.A, ABC.B, ABC.C, Var1.a,
                                        Var1.b, MN.a, MN.b), false, r);
            }
            if (Var2 != null)
            {
                PrintAnswer(Algorithm22(r, ABC.A, ABC.B, ABC.C, Var2.a,
                                        Var2.b, MN.a, MN.b), false, r);
            }
            break;

        case 3:
            PrintAnswer(Algorithm3(r, ABC.A, ABC.B, ABC.C, Var1.a, Var1.b,
                                   Var2.a, Var2.b, MN.a, MN.b), true, r); break;
        }
    }
예제 #2
0
 void Start()
 {
     ABC = new Math.Trio();
     MN  = new Math.Pair();
 }
예제 #3
0
 public void SetParameters2(Math.Pair newParameters2)
 {
     Parameters2 = newParameters2; GetAnswer();
 }
예제 #4
0
 public void SetParameters1(Math.Pair newParameters1)
 {
     Parameters1 = newParameters1; GetAnswer();
 }