温故而知新,今天学习Math.Max和Min的方法。这2个方法,均需要传入2个参数,返回参数中最大值和最小值。


复习C#的方法Math.Max和Math.Min

 

 class Ac
    {
        public void LeanMathFunction()
        {
            int min = Math.Min(5,3);
            Console.WriteLine("5,3最小值Min:{0}",min);

            int max = Math.Max(25,37);
            Console.WriteLine("25,37最大值Max:{0}", max);
        }
    }
Source Code

相关文章:

  • 2022-12-23
  • 2022-01-15
  • 2021-06-11
  • 2021-09-18
  • 2021-10-05
  • 2022-12-23
  • 2021-11-25
  • 2022-02-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案