Print Series (Programming Fundamentals)

The program output is correct but the test cases are coming wrong.
#include
using namespace std;
int main() {
int n1,n2;
cin>>n1;
cin>>n2;
if(n1>0 && n1<100) {

}
else {
return 0;
}
if(n2>0 && n2<100) {

}
else {
return 0;
}
int a;
for(int i=1; i<=n1;i++) {
a=3*i+2;
if(a%n2 != 0) {
cout<<a<<endl;
}

}

return 0;

}

@Abhishek4799 Please save your code on ide.codingblocks.com and share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.