import java.util.Scanner; public class Main { public static void main(String[] args) { int num; Scanner s=new Scanner(System.in); System.out.println("Enter a number: "); num=s.nextInt(); if(num>0) { System.out.println("Positive number"); } else if(num==0) { System.out.println("Zero"); } else { System.out.println("Negative number"); } } }
Enter a number: 28
Positive number