-->
当前位置:首页 > 题库

PROGRAMMING:Calculates the value of a signed function

Luz5年前 (2021-05-10)题库368
For any integer $$n $$, the symbolic function $$sign (n) $$is defined as follows:
![](~/ 3)
Please write a program to calculate the value of this function for any input integer.
###Input format:
The input gives the integer n on one line.
###Output format:
In one line, output the function value corresponding to the integer n according to the format "sign (n) = function value".
###Input sample 1:
```in
ten
```
###Output sample 1:
```out
sign(10) = 1
```
###Input sample 2:
```
0
```
###Output sample 2:
```
sign(0) = 0
```
###Input sample 3:
```
-98
```
###Output sample 3:
```
sign(-98) = -1
```






answer:If there is no answer, please comment