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