반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- matplotlib
- Mac
- Redshift
- Github
- c#
- numpy
- Tkinter
- Excel
- SQL
- Python
- 파이썬
- list
- django
- Google Spreadsheet
- Google Excel
- PostgreSQL
- math
- gas
- array
- hive
- Java
- string
- PANDAS
- dataframe
- PySpark
- Kotlin
- GIT
- Apache
- google apps script
Archives
- Today
- Total
목록양수 (1)
달나라 노트
C# : Math.Sign (부호, 양수/음수)
Math.Sign(x) method는 어떤 숫자 x를 인자로 받으며 이 x값의 부호를 return합니다. x > 0 -> 1 return x = 0 -> 0 return x -1 return using System; class MyProgram { public static void Main() { Console.WriteLine(Math.Sign(125.813)); Console.WriteLine(Math.Sign(0)); Console.WriteLine(Math.Sign(-125.813)); } } -- Result 1 0 -1
C#/C#
2022. 4. 18. 19:40