/home/caleb/ASDV-Java/lab6_CalebFontenot/src/main/java/com/calebfontenot/lab6_calebfontenot/IfElse2.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.lab6_calebfontenot;
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);
}
}
}