import java.util.Scanner; /* * Prompts for a number and prints if the number is greather than zero, less than zero, * or equal to zero. */ public class NegativePositive { public static void main(String []argv) { Scanner sc = new Scanner(System.in); System.out.print("Enter a number: "); int num = sc.nextInt(); if (num < 0) { System.out.println("Negative number"); } else if (num > 0) { System.out.println("Positive number"); } else { System.out.println("Zero"); } } }