Then open it in emacs and read through it to figure out what it is doing. What result is it calculating? Rewrite this program so it is easier to understand, both for the user and the programmer who must modify it in the future. Compile it and execute it.
Edit the program to correct the mistakes. Remember to save the file after you change it and before you try to re-compile it. Keep track of each bug you find. Which ones are syntactic errors and which one are logical errors?