Sir the output of my code come half .Please tell me on where i make mistake .
#include
using namespace std;
int main() {
int n1,n2;
int n=1;
cin>>n1>>n2;
while(n<=n1)
{
int k=3*n+2;
if (k%n2!=0)
{
cout <<k<<endl;
}
n++;
}
return 0;
}