What is the problem here? 3 work, but 4, no :/
package com.codegym.task.task07.task0706;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
/*
Streets and houses
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int[] arr = new int[15];
int countEven = 0;
int countOdd = 0;
Scanner sc = new Scanner(System.in);
for(int i = 0; i < 15; i++)
arr[i] = sc.nextInt();
for(int j = 0; j < 15; j++)
if (arr[j]%2==0) {
countEven++;
} else {
countOdd++;
}
if (countEven > countOdd)
System.out.println("Even-numbered houses have more residents.");
if (countOdd > countEven)
System.out.println("Odd-numbered houses have more residents.");
}
}