Code is copied!
Program to input a number and check whether it is positive negative or zero JAVA
Write a Program to input a number and check whether it is positive negative or zero.
import java.util.*; class number { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if(n < 0) System.out.println("It is a negative number"); else if(n>0) System.out.println("It is a positive number"); else System.out.println("It is a zero"); } }