Can’t understand the basic criteria for solving question
Here is my code:
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–){
int a, b;
cin>>a>>b;
int visit = 0;
for(int i = a;i<=b;i++){
int flag = 0;
for(int j = 2; j < i; j++){
if(i%j==0){
++flag;
}
if(flag == 2)
{
++visit;
break;
}
}
}
cout<<visit<<endl;
}
return 0;
}