We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
"if(n%2==1 || (n>=6 && n <= 20))"...The || operator will only evaluate the left hand side condition and will never satisfies the rest of the test cases...As i am getting a compilaion error. Could you please clear this doubt ?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java If-Else
You are viewing a single comment's thread. Return to all comments →
"if(n%2==1 || (n>=6 && n <= 20))"...The || operator will only evaluate the left hand side condition and will never satisfies the rest of the test cases...As i am getting a compilaion error. Could you please clear this doubt ?