반응형
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
- PySpark
- array
- dataframe
- django
- Github
- string
- SQL
- PANDAS
- Java
- Apache
- Tkinter
- 파이썬
- hive
- Excel
- Redshift
- Google Spreadsheet
- google apps script
- GIT
- Kotlin
- Mac
- math
- list
- PostgreSQL
- gas
- Python
- c#
- matplotlib
- Google Excel
- numpy
Archives
- Today
- Total
목록Sign (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