Shouldnt there be if(i%3==0) instead of (n%3==0) and same for the other two, if not then why?
Got a problem with code
@sshreya2912 yes you are right it should be i%3 not n%3
i hope your doubt is cleared if yes don’t forget to mark the doubt resolved and hit like 
okay thank you so much! 