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;
}