In sublime getting right answer but am not able to pass aby test case in cd IDE where am getting wrong?

#include
using namespace std;
void serias(int n1, int n2);

int main()
{
int n1,n2;
cin>>n1>>n2;
serias(n1, n2);
return 0;
}
void serias(int n1, int n2)
{
int x, i, j= 1;
for(i = 1;j<=n1;i++)
{
x = 3 * i + 2;
if(x%n2!=0)
{
cout<<x<<endl;
}
j++;
}
}

hello @farid.chorshanbiev
pls save ur code here-> https://ide.codingblocks.com/
and share the link with me.

I am not able to send through cb ide i write my code and after when i press share there are no link checkbox is empty so that is why i am always copy pasting here my code from subline , kindly request please try my code and tell me my mistake thank you .

paste ur code in the editor.
after that
image
click on this file option , there u will see save option.
click on it.

a link will be generated in the search bar

share that link with me

here is my code https://ide.codingblocks.com/s/289177

hello @farid.chorshanbiev
image
this is not correct.
we dont know after how many iterations we get n1 terms of required series.

so use while loop .

image

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.