title: Print a number from 0 to inputted number that divisible by 3 or end with 3
body: <p>There's one hidden test case that this code doesn't work and I don't know why. [EDITED] Sorry for the lack of information. I'm using an app to learn Java and this is a coding test, there are 4 total test with 4 different inputs, the first 3 one is fine but the last one (hidden so I don't know the input and output) told me that it's wrong but I don't know what's wrong in my code</p>
  <pre><code>import java.util.Scanner;
  
  public class Main {
     public static void main(String[] args) {
         Scanner read = new Scanner(System.in);
         int number = read.nextInt();
         int x = 3;
  
         while(number &gt; 3 &amp;&amp; x &lt;= number)
         {
             if(x%3==0 || x%10==3)
             {
                 System.out.println(x);
             }
             ++x;
         }
     }
  }
  </code></pre>