Write a C function which display the value of n is 1 when m is larger than 0, 0 when
m is 0 and -1 when m is less than 0.
Answers
Answered by
1
Answer:
I am a Python Coder. Convert it in C language own.
Explanation:
def functionDemo( n ) :
if n > 0:
return 1
elif n == 0:
return 0
else:
return -1
if __name__ == "__main__" :
m = int(input(" Enter a number : "))
print( functionDemo(m))
Similar questions