Computer Science, asked by nikraghav2936, 1 month ago

Algorithm to check whether the given number is positive and negative.

Answers

Answered by jai696
2

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

def main(n):

if n == 0:

return "zero"

if n > 0:

return "positive"

return "negative"

print(main((n := int(input("n: ")))))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions