コード例 #1
0
        protected virtual void GenerateFormulaArray(System.Collections.ArrayList list)
        {
            int i, k;

            for (i = this.numberRange1.Min; i <= this.numberRange1.Max; i++)
            {
                for (k = this.numberRange2.Min; k <= this.numberRange2.Max; k++)
                {
                    Formula formula = new Formula();
                    formula.AddOperator(FormulaOperator.NoneOperator(i));
                    formula.AddOperator(FormulaOperator.MultiplicationOperator(k));
                    formula.Result = i * k;

                    list.Add(formula);
                }
            }
        }
コード例 #2
0
        protected override void GenerateFormulaArray(ArrayList list)
        {
            int i, k;

            for (i = this.NumberRange1.Min; i <= this.NumberRange1.Max; i++)
            {
                for (k = this.NumberRange2.Min; k <= this.NumberRange2.Max; k++)
                {
                    int     leftValue = i * k;
                    Formula formula   = new Formula();
                    formula.AddOperator(FormulaOperator.NoneOperator(leftValue));
                    formula.AddOperator(FormulaOperator.DivisionOperator(i));
                    formula.Result = k;

                    list.Add(formula);
                }
            }
        }