We investigate the formation of a two-dimensional quasicrystal in a monodisperse system, using molecular dynamics simulations of hard sphere particles interacting via a two-dimensional square-well potential. We find that more than one stable crystalline phase can form for certain values of the square-well parameters. Quenching the liquid phase at a very low temperature, we obtain an amorphous phase. By heating this amorphous phase, we obtain a quasicrystalline structure with five-fold symmetry. From estimations of the Helmholtz potentials of the stable crystalline phases and of the quasicrystal, we conclude that the observed quasicrystal phase can be the stable phase in a specific range of temperatures.