static void Main(string[] args) { Calculator c = new Calculator(); int x = c.Add(2, 3); string data = c.Today(); //Console.WriteLine(x); //有输入,有返回值 //Console.WriteLine(data); //无输入,有返回值 //c.PrintSum(4, 6); //有输入,无输出 c.PrintXTo0(20); c.PrintXTo1(10); int result = c.SumFrom1ToY(100); Console.WriteLine(result); Console.ReadLine(); }
static void Main(string[] args) { Calculator c = new Calculator(); int x = c.Add(2, 3); Console.WriteLine(x); string str = c.Today(); Console.WriteLine(str); c.PrintSum(4, 6); //==================== Calculator_b c2 = new Calculator_b(); c2.PrintXto1_a(10); c2.PrintXto1_b(10); }