Compiled and modified so that it didn't have errors

Moved the fopen to main function. Changed %s to %d in display-main.
Added braces to if statement at 393 before else