Java Program runs but gives no output
<p>Hey guys i was working on a project and the output gives nothing. I already tried a bunch of things which all gave no output except for moving System.out.print above the brace which just printed out an infinite number of random numbers. It's a short code so here it is:</p>

<pre><code>import java.util.Scanner;
import java.io.IOException;
import java.io.File;

public class ACSLPrintsJR {
public static int value(int num){
int [] array = {0,16,16,8,8,4,4,2,2,1,1};
    return array[num];
}

public static void main(String[] args) throws IOException {
    int top = 1;
    int bottom = 1;
    File file = new File("ACSLPRINTSJR.IN");
    Scanner scan = new Scanner(file);
    int num = scan.nextInt();
    while (num != 0){
    num = scan.nextInt();
        if (num % 2 == 0)
            top += 1 + value(num);
        else 
            bottom += 1 + value(num);
    }       
    System.out.println(top+"/"+bottom);
scan.close();
}

}
</code></pre>

<p>As i said there is no output and here is the content of the IN file</p>

<p>Input is:</p>

<blockquote>
  <p>8 7 2 0</p>
  
  <p>0</p>
</blockquote>

<p>Expected output is:</p>

<blockquote>
  <p>19/3</p>
  
  <p>1/1</p>
</blockquote>

<p>Current output:
Nothing</p>