OneCompiler

Atividade 5 lista01

52

Example heading with h2 size

Example heading with h3 size

Following is sample java code.


public class App {
  public static void main(String[] args) throws Exception {
    Scanner scanner = new Scanner(System.in);
    System.out.println("Informe um número inteiro N: ");
    int n = scanner.nextInt();
    if (n % 2 == 0) {
      System.out.println("Esse número é par!");
    }
      else {
        System.out.println("Esse número é ímpar");
      }
      
      scanner.close();
    }
}