示例#1
0
 public void Test_Calc()
 {
     Assert.Equal(5, Program9.Sum(2, 3));
     Assert.Equal(6, Program9.Multiply(2, 3));
     Assert.Equal(1, Program9.Substract(3, 2));
     Assert.Equal(1, Program9.Divide(2, 2));
 }
示例#2
0
        public static void Main()
        {
            Console.WriteLine("Welcome to the main menu");
            Console.WriteLine("Please enter the name of the program you want to use");
            Console.WriteLine("For the number swapper, enter the word 'number'");
            Console.WriteLine("For the number sorter, enter the word 'sorter'");
            Console.WriteLine("For the grades machine, enter the word 'grade'");
            Console.WriteLine("For the name machine, enter the word 'name'");
            string userInput = Console.ReadLine();

            switch (userInput)
            {
            case "number":
                Program6.Main();
                break;

            case "sorter":
                Program7.Main();
                break;

            case "grade":
                Program8.Main();
                break;

            case "name":
                Program9.Main();
                break;
            }
        }
示例#3
0
 public static void Main()
 {
     Program9 p9 = new Program9();
     p9.program9M();
 }