You can compare your results to mine by executing the following command. Note that you will not see a prompt but your program will be waiting for the input file name. Just type it.
main | diff - example.out
example.in
If there are differences, lines of your output will start with < and lines of my output will start with >