I think my code is correct
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) {
Scanner kb = new Scanner(System.in);
int arr[]= new int[15];
int odd=0;
int even=0;
for(int i = 0; i<arr.length;i++) {
arr[i]= kb.nextInt();
if (i%2==0)
even++;
else
odd++;
}
if (odd>even) {
System.out.println("Odd-numbered houses have more residents.");
}
else
System.out.println("Even-numbered houses have more residents.");
}
}