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.
I didn't forget it, it's just not defined as to what I'm supposed to do with 101. My reading of the "constraints" was that the inputs would be between 1 and 100... If the author is now failing you for not taking into account the constraint he should specify what should happen when you're outside the bounds. e.g. throw an exception or print nothing.
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 →
I didn't forget it, it's just not defined as to what I'm supposed to do with 101. My reading of the "constraints" was that the inputs would be between 1 and 100... If the author is now failing you for not taking into account the constraint he should specify what should happen when you're outside the bounds. e.g. throw an exception or print nothing.