Delhi odd even not passing

#include

using namespace std;

int main() {
int n,i,sum,a[50],rem;
cin>>n;
for(i=0;i<n;i++)
{cin>>a[i];}
for(i=0;i<n;i++)
{
sum=0;
while(a[i]!=0)
{rem=a[i]%10;
sum=sum+rem;
a[i]=a[i]/10;

}
if(sum%2==0)
{
if(sum%4==0)
{cout<<“Yes”;}
else
cout<<“No”;

}
else
{

if(sum%3==0)
{cout<<"Yes";}
else
cout<<"No";

}

cout<<endl;

}
return 0;
}
this code is not passing

please save your code at coding blocks ide and then send the link of code.


so that we can check and modify your code

cin>>n;
for(i=0;i<n;i++)
{cin>>a[i];}

what are doing here n is no of cars not car’s no means n times you have to calculate the ans
correct statement should be
int n;
cin>>n;
for(int i=0;i<n;i++){
long long int number;
cin>>number;
/*
here you have to calculate and print the ans
*/

}
i hope you understand i yes then hit a like