Why is my code not correct?Please explain

#include
using namespace std;
int main(){
int N1;
cin>>N1;
int N2;
cin>>N2;
int n;
int sum;
for(n=1;n<=N1;n++){
sum= 3*n+2;
if(sum%N2!=0){
cout<<sum<<endl;
}
}
return 0;
}

@shresth_2000 please share your code by saving it on CB ide

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.