Print series number

I won’t be able to solve please explain me and give me the solution


Hope this clears all ur doubts

please explain me first I want explanation

your code is not running its showing some error

So what basically question is asking is to print first N1 terms of the series 3n + 2 which are not multiples of N2.
So the while loop runs for n1 times (ie count <= n1). after count > n1 loop terminates.
then every time we calculate the value s = 3*n+2. by doing s%n2!=0 we get to know that the current number is not a multiple of n2 and increment our count value.

The code is working perfectly fine and passing all the test cases. try refreshing ur page.
And hope that now logic is clear to u

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.

how can I solve this by using continue statements please send me the code

why do u even have to use continue statement in this code… this is such a simple question. why make things complicated