using System;

public class 수학관련함수
{
    public static void Main()
    {
        Console.WriteLine( Math.E); // 자연로그
        Console.WriteLine( Math.PI); // 3.1415926535

        Console.WriteLine( Math.Abs(-10) ); // 절대값
        Console.WriteLine( Math.Pow(2, 10) ); //2 ^ 10 = 1024
        Console.WriteLine( Math.Round(1234.5678, 2) ); //1234.57
        Console.WriteLine( Math.Max(3, 5) ); // 5
        Console.WriteLine( Math.Min(3, 5) ); // 3
    }
}

'.NET프로그래밍 > C# 3.5 SP1' 카테고리의 다른 글

34. 환경변수  (0) 2009.08.07
수학관련함수예제 - ROUND(반올림)함수  (0) 2009.08.07
32. 스트링포맷(String.Format)  (0) 2009.08.07
31. 파일명 추출  (0) 2009.08.07
30. 스트링(string)클래스  (0) 2009.08.07
Posted by holland14
: