Write a program java to check number is positive, negative or zero - Pratik Ghelani

Pratik Ghelani

Breaking

Friday, January 25, 2019

Write a program java to check number is positive, negative or zero

Program:-

public class p3be {
public static void main(String[] args)
{
int a=70;
if(a>0)
{
System.out.println(a+" is Postive Number ");
}
else if(a<0)
{
System.out.println(a+" is Negative Number");
}
else
{
System.out.println(a+" is Zero Number");
}
}

}

Output:-




No comments:

Post a Comment