Printing a series

i wrote a code for printing a series which said that we have to enter 2 num and the series of 3n+2 should be printed till n1 digits and the factors of n2 should not be printed.
so i did this and it was showing error,

int main (){
int n1,n2,k;
int i=1;
cin>>n1>>n2;

while(i<=n1){
k=3*i+2;
if(k%n2 !=0){
cout<<k<<endl;
i++;
}
else
i++;
}
retuen 0;
}

i even tried to initialize n1,n1,k, all equal to zero but still it was showing error.

}

@thapacyrus29 hey cyrus next time please next time follow cb.lk/askdoubt and the issue with your code is that in while loop you are incrementing the value of the while loop which will not work remove i++ from there and second thing in the else blocks instead of i++ do n1++;
and after that increment the while loop i.e i++