why we using n inside for loop
i mean
for(int i=2;i<=n;i++)
{
if(n%3==0) // why we are checking for n inside for loop
it should be i instead of i because we checking n/3,n/2, and n-1 then why n is here
}
why we using n inside for loop
i mean
for(int i=2;i<=n;i++)
{
if(n%3==0) // why we are checking for n inside for loop
it should be i instead of i because we checking n/3,n/2, and n-1 then why n is here
}
yes you are right
this is a mistake in video
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.