Put your code in between code tags
Since you are building a table you would presumable need a column in which to print pass or fail
Run the program and after it prints out the student ID and average add a line with the if statement. Now rerun the program and test if you get the desired effect. Continue to run and make code mods until the program performs as desired.