for n=5 your output is 4 but correct answer is 3
you should replace n with i in code.
Correction in code i instead of n
Hi what is ur doubt exactly?
code show in this video is wrong. for input n=5 output should be 3 but code produces output 4.
therefore code is wrong. in code instead of (n%x) there should be (i%x). then it runs fine
yes u are correct. thanks for pointing it out. will pass it to the team
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.