Ejemplo n.º 1
0
        //生成混合题目
        public string mixture(int scope)
        {
            string ret    = "";
            Random random = new Random();

            for (int i = 0; i < 3; i++)
            {
                switch (random.Next(1, 4))
                {
                case 1:
                    ret += NumbersAndSymbols.integer(scope);
                    break;

                case 2:
                    ret += NumbersAndSymbols.decimals(scope);
                    break;

                case 3:
                    ret += NumbersAndSymbols.grade(scope);
                    break;
                }
                if (i != 2)
                {
                    ret += NumbersAndSymbols.operators();
                }
            }
            return(ret);
        }
Ejemplo n.º 2
0
        //生成四年级题目
        public static string topicfour(int scope)
        {
            string ret;

            ret = NumbersAndSymbols.integer(scope) + " " + NumbersAndSymbols.operators() + " " + NumbersAndSymbols.integer(scope) + " " + NumbersAndSymbols.operators() + " " + NumbersAndSymbols.integer(scope);
            return(ret);
        }