Main Program: Final Outputs and Program Termination

After the outer loop finishes, we can finish up by reporting the averages $ \left<s_1\right>$ from the tallies of s and e.
  fprintf(stdout,"# The average magnetization is %.5lf\n",
                 ssum/nSamp);
  fprintf(stdout,"# The average energy per spin is %.5lf\n",
                 esum/nSamp);
  fprintf(stdout,"# Program ends.\n");
}



cfa22@drexel.edu