write a program that takes input a number from user and state whether the number is positive, negative or zero.
Answers
Answered by
2
Answer:
Start
input a
if a = 0, print 'ZERO'
if a < 0, print 'NEGATIVE'
if a > 0, print 'POSITIVE'
Stop
Explanation:
hope this helps Mark as branliest pls
Answered by
2
class demo
{
public void display(int a)
{
if(a==0)
System.out.print(“0”);
if(a>0)
System.out.print(“positive ”);
if(a<0)
System.out.print(“negative ”);
}
}
{
public void display(int a)
{
if(a==0)
System.out.print(“0”);
if(a>0)
System.out.print(“positive ”);
if(a<0)
System.out.print(“negative ”);
}
}
Similar questions
Math,
5 months ago
Art,
5 months ago
Math,
11 months ago
Math,
11 months ago
Computer Science,
1 year ago