Challenge round

the code is working fine on eclipse but showing error in challenge round

Hi please paste and save your code on online coding blocks ide and then provide the link.

Hi Vinayak please provide the link here.

import java.util.Scanner;

public class OddEven {

public static void main(String[] args) {
	Scanner scn = new Scanner(System.in);
	int n = scn.nextInt();
	if (n >= 0 && n <= 1000) {
		while (n != 0) {
			int car = scn.nextInt();
			if (car >= 0 && car <= 1000000000) {
				int rem;
				int sum = 0;
				while (car != 0) {
					rem = car % 10;
					sum += rem;
					car = car / 10;
				}
				if (sum % 4 == 0 && sum % 2 == 0) {
					System.out.println("Yes");
				} else if (sum % 2 != 0 && sum % 3 == 0) {
					System.out.println("Yes");
				} else {
					System.out.println("No");
				}
			}
			--n;
		}

	}
}

}

Hi Vinayak,Your are reading problem statemnt wrong you are just summing up the complete Integer digits and then checking the conditions.
BUT,the question demands the sum of elements at even position in the number should be a multiple of 3 or the sum of elements at odd position should be a mult of 4.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.