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.
}