here is my code:
#include
using namespace std;
int main() {
int t;
cin>>t;
for(int i=0;i<t;i++)
{
int count=0;
int a,b;
cin>>a>>b;
for(int j=a;j<=b;j++)
{
while(j>0)
{
if(j&1)
++count;
j=j>>1;
}
}
cout<<count<<endl;
}
return 0;
}
why is infinite loop running
