Failing test cases 1 and 2 even after using try-catch, only if statement, if-else

I was doing Ganesha’s pattern problem in the Challenges - Fundamentals and Patterns. Everything works fine when i did my code in Eclipse but two testcases out of three failed . Is there any way to know what the other testcases are and what should be the exact statement to print in case of wrong answer. Here is the problematic code snippet:
if (x % 2 == 1 && x >= 5 && x <= 99) {
Satya(7);}
I have tried using try-catch, such that no statement is printed at all and the program is terminated, using only if statement such that the program doesn’t start if the number doesn’t statisfy my conditions, I have also tried using if-else statement such that it would print out “Please enter a valid odd number.” if the conditions are not met.