Positive-Negative in Java

 POSITIVE-NEGATIVE PROGRAM IN JAVA.


*********************************

public class PositiveNegative
{
   public static void main (String args [])
   {
      Scanner sc=new Scanner(System.in);
      System.out.println("ENTER A NUMBER");
      int num = sc.nextInt();
     
      if(num>0)
      System.out.println("NUMBER IS POSITIVE");
      else
      System.out.println("NUMBER IS NEGATIVE");

   }
}

**********************************
By- BLUEJ HUB 




Post a Comment

0 Comments