Code is working correct for delhi's odd even but test case fail

here’s my code it is working perfect and giving desired results but test case is fail. what changes will i do in it.

#include
using namespace std;
int main(){
int p,l;
long int arr[100];
int n,i,no,j=1,t=10,temp=0;
cin>>p;
for(l=0;l<p;l++){
cin>>arr[l];
j=1;
t=10;
for(i=1;i<arr[l]+1;i*=10){

		if(arr[l]>=1*i and arr[l]<10*i){
			continue;
		}
		else{
			j=j+1;

// cout<<"Value of i “<<i<<” Value of j "<<j<<endl;
continue;
}
}
temp=arr[l]%10;
// cout<<j<<endl<<n%100<<endl<<n%10;
for(i=1;i<j;i++){
no=((arr[l]%(10t))-(arr[l]%t))/t;
// cout<<endl<<no<<endl<<(no<<(i))<<endl;
t
=10;
temp=temp+no;
}
arr[l]=temp;
}
for(l=0;l<p;l++){
if(arr[l]%4==0 or arr[l]%3==0){
cout<<“Yes”<<endl;
}
else{
cout<<“No”<<endl;
}
}
return 0;
}

bro
u are going by a quite complex approach


see this solution
just add all even no and all odd number and then check for the condition

then print yes no

okk sir thank you for helping

1 Like

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.