| /home/chloe/ASDV-Java/lab6_ChloeFontenot/src/main/java/com/chloefontenot/lab6_chloefontenot/IfElse2.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.chloefontenot.lab6_chloefontenot;
import java.util.Scanner;
public class IfElse2 {
public static void main(String[] args) {
int number;
System.out.print("Please enter a even or odd number: ");
number = new Scanner(System.in).nextInt();
if ( number % 2 == 0 )
{
System.out.println("You typed the EVEN number " + number);
}
else
{
System.out.println("You typed the ODD number " + number);
}
}
}