7 lines
97 B
C++
7 lines
97 B
C++
1 year ago
|
int signum(int num) {
|
||
|
int retval = 0;
|
||
|
(num > 0) ? retval = 1 : retval = -1;
|
||
|
return retval;
|
||
|
}
|
||
|
|