Display the energy in main.cc.