/bin/run.sh: line 4: 17 Arithmetic exception (core dumped) ./exe

#include
using namespace std;
int main() {
int n1,n2;
cin>>n1>>n2;
int a,i=1;
int c=1;
while(c<=n1)
{
a=(3*i)+2;
i++;
if((a % n2 )==0)
{
}
else
{
cout<<a<<" ";
c++;
}
}
return 0;
}

i am not able to resolve the error

@shreyakulkarni91
I submitted this code and it got accepted. Please try to submit it again.