Java

Logic to find whether number is Negative or Positive

class PositiveNegative
{
 public static void main(String[] args)
 {
 int n=10;
 if (n<0)
 {
  System.out.println("Number is negative");
 }
 else
  {
  System.out.println("Number is positive");
  }
 }
}
 

Related Posts

language_img
Java

Camel Casing Rule

Jul 7, 2020

Table Of Contents

;