Check a number is positive

Report a typo

Write a program that reads a number and prints YES if it is positive. Otherwise, the program should print NO.

Do not forget that zero is not a positive number.

Sample Input 1:

7

Sample Output 1:

YES
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}
___

Create a free account to access the full topic