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.
check the if condition..if the number is odd it will print weird and skip the else part. if the 'if' part proves false then by default the number is even ,it will enter the else loop to check for the limit condition and those numbers might be 6,8,10,12,14,16,18,20
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 →
check the if condition..if the number is odd it will print weird and skip the else part. if the 'if' part proves false then by default the number is even ,it will enter the else loop to check for the limit condition and those numbers might be 6,8,10,12,14,16,18,20