package com.codegym.task.task07.task0706; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Streets and houses */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int arr[] = new int[15]; int even = 0; int odd = 0; for (int i = 0; i < arr.length; i++) { arr[i] = Integer.parseInt(reader.readLine()); if(i % 2 == 0) {even= even + arr[i];} else { odd = odd + arr[i];} } System.out.println(even); System.out.println(odd); if(odd > even) { System.out.println("Odd-numbered houses have more residents.");} else {System.out.println("Even-numbered houses have more residents.");} } }