Doubt in pattern 21

Mam can we also initialize nsp with n+2 ?
nsp=n+2 ?

Hey @sanjaypanj940,
No, you cannot initialize nsp with n+2. Because it’s not necessary that you are given n=5 as input only. If n=6, then nsp= n + 2 will give nsp = 8. Which will be incorrect as nsp should be equal to 9.

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.