I'm trying to figure what's wrong with this code if you can help I'll be thankful to you

#include
using namespace std;

int main() {
ios_base::sync_with_stdio(false);
int t,x,y;
cin>>t;
while(t)
{ y=0;
cin>>x;
while(x)
{ if(x%10==4)
{y++;
x/=10;
}
else
{continue;
x/=10;
}

 }
   cout<<y<<endl;
   
t--;

}
return 0;
}