I need to make it so the computer figures out whether an int somebody entered is even or not. How would I prove that? I tied just dividing it by two, but that isn't a boolean, and I don't know how I would figure it out with booleans either. Also would I need a separate counter to count the evens?
import java.util.Scanner;
public class evenNumber {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int numberOne = 0;
for(int counter = 0; counter < 15; counter++)
System.out.print("Enter a number: ");
numberOne = scan.nextInt();
if(numberOne/2 ){
}
}
}