Output is good.
Verify say : task no met.?
Thanks for your help!
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 r = new BufferedReader ( new InputStreamReader(System.in));
int c=0; int d =0;
int [] a= new int[15];
for ( int i =0; i < a.length; i++) {
String s = r.readLine();
int b= Integer.parseInt(s);
a[i]= b;
if ( i%2==0)
c = c++;
else d = d++;
}
if ( c > d) {
System.out.println("Even-numbered houses have more residents.");
}
else
if ( d> c && d!= c)
System.out.println("Odd-numbered houses have more residents.");
//write your code here
}
}