示例#1
0
        static void Main(string[] args)
        {
            string str = Console.ReadLine();

            for (int i = 0; i < Convert.ToInt32(str); i++)
            {
                int A = 200;
                int d = 200;
                pp  Q = new pp();
                int P = Q.rd(0, 2), P1 = Q.rd(0, 2), P2 = Q.rd(1, 3), P3 = Q.rd(1, 4);
                int B = Q.rd(1, 100), C = Q.rd(1, 100), D = Q.rd(1, 100);
                int a = Q.rd(1, 100), b = Q.rd(1, 100);


                if (Q.calculator(d, a, b, A, B, C, D, P, P1, P2, P3) < 0)
                {
                    i--;
                }
            }



            System.Console.WriteLine("hahaha");
            System.Threading.Thread.Sleep(1000000000);
        }
示例#2
0
        public void TestMethod4()
        {
            //准备
            ConsoleApp2.pp test = new ConsoleApp2.pp();

            //设定测试用例
            int d = 10; int a = 5; int b = 2; int A = 30; int B = 15; int C = 10; int D = 5; int P = 0; int P1 = 0; int P2 = 2; int P3 = 1;
            //测试标准
            int actual = test.calculator(d, a, b, A, B, C, D, P, P1, P2, P3);
            int expect = 35;

            //判断
            Assert.AreEqual(expected: expect, actual: actual, message: "除乘加不正确");
        }