Computer Science, asked by r7729803937gmailcom, 2 months ago

write an algorithm to check whether a number is positive or negative​

Answers

Answered by jai696
2

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

def check_num(n):

if n == 0:

return "0"

if n > 0:

return "positive"

return "negative"

n = int(input("enter num: "))

print(check_num(n))

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

Similar questions