Sir i dont understand this question?

i try to understand this but i am not able to understand i assume that for n1 time the code will print number but they are not multiple of n2 so for example if n1=10 and n2=4
it should print from 3 and upto 10 numbers?

Hi @ansarirehaan2925_b13ac9c75c4c49d0
For the input:
3
2
Then we need to print first 3 terms starting from n = 1 in the given series (3n + 2) which are not divisible by 2.
In that case nums starting from n = 1 are 5, 8, 11, 14, 17, 23… and so on. but we need to print only those numbers which are not divisible by 2, which are, 5, 11, 17.

The problem most of the students will face is
“how to print first N1 terms?”
“What should be the condition to end the loop?” as the N1 terms are not defined.
Ans is simple we will use a counter variable and initialize it with 0 and will increment it only when we got the number in the series which is not divisible by N2 till the counter is smaller than N1

@ansarirehaan2925_b13ac9c75c4c49d0 please refer this ive commented https://ide.codingblocks.com/s/657459

thankyou bhaiya samajh gya

1 Like

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.