일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- Tkinter
- Apache
- array
- PANDAS
- Mac
- PySpark
- Redshift
- SQL
- Java
- gas
- Excel
- string
- Github
- Kotlin
- matplotlib
- math
- c#
- PostgreSQL
- Google Excel
- 파이썬
- Python
- django
- dataframe
- hive
- numpy
- google apps script
- list
- GIT
- Google Spreadsheet
- Today
- Total
목록c# (87)
달나라 노트
C#에서 Math class는 다양한 수학적인 기능을 제공합니다. Math.Round는 소수점을 반올림한 값을 return해줍니다. Syntax Math.Round(number, digit) number를 digit에 명시된 소수점 자리까지 남긴 후 그 이하의 자릿수에서 반올림합니다. 예시는 다음과 같습니다. using System; class MyProgram { static void Main() { double value1 = 9.873; double result = Math.Round(value1, 1); Console.WriteLine(result); } } -- Result 9.9 Math.Ceiling은 소수점을 올림한 값을 return해줍니다. Syntax Math.Ceiling(number..
C#에서 Math class는 다양한 수학적인 기능을 제공합니다. Math.Abs는 절대값을 return해줍니다. using System; class MyProgram { static void Main() { double value1 = -9.8; double result = Math.Abs(value1); Console.WriteLine(result); } } -- Result 9.8
C#에서 Math class는 다양한 수학적인 기능을 제공합니다. Math.Sqrt는 제곱근을 return해줍니다. using System; class MyProgram { static void Main() { int value1 = 9; double result = Math.Sqrt(value1); Console.WriteLine(result); } } -- Result 3 주의할 점은 Sqrt의 결과값은 실수이므로 double 형태로 선언한 result 변수에 Sqrt의 결과를 할당합니다.
C#에서 Math class는 다양한 수학적인 기능을 제공합니다. Math.max는 최대값을 return해줍니다. Math.min은 최소값을 return해줍니다. using System; class MyProgram { static void Main() { int value1 = 2; int value2 = 3; int result = Math.Max(value1, value2); Console.WriteLine(result); } } -- Result 3 max는 2개의 인자만을 받으며 2개의 인자 중 더 큰 값을 return합니다. using System; class MyProgram { static void Main() { int value1 = 2; int value2 = 3; int result..