.Net Project/.Net C#

27장 Math(수학관련함수)

Magic_kit 2009. 8. 10. 18:46
반응형

using System;

public class Math관련
{
    public static void Main(string[] args)
    {
        Console.WriteLine(Math.E);                                // 자연로그
        Console.WriteLine(Math.PI);                               // 원주율

        Console.WriteLine(Math.Abs(-10));                     // 절대값
        Console.WriteLine(Math.Pow(2, 10));                  // 제곱근
        Console.WriteLine(Math.Round(1234.5678, 2));     // 자리수 이하 반올림
        Console.WriteLine(Math.Max(3, 5));                   // 최대값
        Console.WriteLine(Math.Min(3, 5));                    // 최소값
    }
}

- Math
http://msdn.microsoft.com/ko-kr/library/system.math_members(VS.95).aspx

반응형