예제 #1
0
        static void Main(string[] args)
        {
            // Console.WriteLine(CM10.Shunting("60.8-54.23"));
            // Console.WriteLine(CM30.IsDouble((CM10.Shunting("60.8-54.23")).ToString()));


            Console.WriteLine("你是多少年级?????、");
            int s1 = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("你想做多少道题?????、");
            int s2 = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("你希望题中数的范围是多少?????、");
            int s3 = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("你希望做多少个运算符以内的四则运算?????、");
            int s4 = Convert.ToInt32(Console.ReadLine());

            CM21.IsGrades(s1, s2, s3, s4);

            //Fraction_Math Franction = new Fraction_Math();
            //Console.Write(Franction.Add(0.7,0.6).Numerator+"/"+ Franction.Add(0.7, 0.6).Denominator);
            //for (int i = 0; i <= s2; i++)
            //{
            //    Console.WriteLine(CM22.DecimalAndInteger(s3));
            //}

            //Console.WriteLine(s);
            Console.ReadKey();

            //string s = "(" + "1" + "+" + "3" + ")" + "*" + "10";
        }
예제 #2
0
        static void Main(string[] args)
        {
            //Stack<double> s = new Stack<double>();
            //double t = 1.1;
            //string st = t.ToString();
            //s.Push(Convert.ToDouble( st));
            //string a = "10+12-50+60×2";
            //Console.WriteLine(CM10.Shunting(a));
            // Involution.Generate(a, 3);
            //  Console.WriteLine(CM30.Random_Fraction());

            // Console.WriteLine(CM11.Shunting("(2+1)×2"));
            //Console.WriteLine(CM30.IsDouble((CM10.Shunting("60.8×54.23")).ToString()));

            //string s= Fraction_Math.Fraction(2.5,1.2,'/');
            //Console.WriteLine(s);


            Console.WriteLine("你是多少年级?????、");
            int s1 = Convert.ToInt32(Console.ReadLine());



            Console.WriteLine("你想做多少道题?????、");
            int s2 = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("你希望题中数的范围是多少?????、");
            int s3 = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("你希望做多少个运算符以内的四则运算?????、");
            int s4 = Convert.ToInt32(Console.ReadLine());

            //符号配置{ "+", "-", "×", "÷" };
            //calculation = new string[] { "+", "-", "×", "÷" };


            //foreach (int i in Brackets.Generate("2+6-5×5", 3))
            //{
            //    Console.WriteLine(i);
            //}

            //年级配置
            CM21.IsGrades(s1, s2, s3, s4);
            //用户自定义
            //CM22.ProblemSet(s2, s3, s4, calculation, true, true, false);


            //Console.WriteLine(Fraction_Math.Fraction(0.5,0.5,'+'));

            //for (int i = 0; i <= s2; i++)
            //{
            //    Console.WriteLine(CM22.DecimalAndInteger(s3));
            //}

            //Console.WriteLine(s);
            Console.ReadKey();

            //string s = "(" + "1" + "+" + "3" + ")" + "*" + "10";
        }