write a program that calculate that tell number is positive or negative
public class posiNeg
{
public static void main(String args[])
{
int num ;
if(num>0)
System.out.println("Number is positive "+num);
else if(num<0)
System.out.println("Number is ngitive "+num);
else
System.out.println("Number is Zero ");
}}
0 comments:
Post a Comment