The array w[17] contains values of \Delta E spanning from -8J to 8J and it is precalculated in the main part for every new temperature. The program takes as input the initial temperature, final temperature, a temperature step, the number of spins in one direction (we force the lattice to be a square lattice, meaning that we have the same number of spins in the x and the y directions) and the number of Monte Carlo cycles.