Delhi's odd even doubt giving error

public static void main(String args[]) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int x = 0;
int car[] = new int[n - 1];

	while (x <= n - 1 && n <= 1000 && n >= 0) {
		car[x] = s.nextInt();
		x++;
	}
	int i = 0;
	int rem;
	int oddsum = 0;
	int evensum = 0;
	int y;
	while (i <= n - 1) {
		y = car[i];
		while (y > 0) {
			rem = y % 10;
			if (rem % 2 == 0) {
				evensum = evensum + rem;
			} else {
				oddsum = oddsum + rem;
			}

			y = y / 10;

		}
		if (evensum % 4 == 0) {
			System.out.println("yes");
		} else if (oddsum % 3 == 0) {
			System.out.println("no");
		}
		i++;
	}

https://online.codingblocks.com/player/29363/content/6861/4700

These should be re-initialized to 0 for every test case. So put them inside the while loop.

The size of this array will be n. And should be written as int[] car = new int[n]

You have to print ‘yes’ for this condition as well. If either of these conditions are not satisfied, then print no