Formation and Evolution of X-Ray Clusters: A Hydrodynamic Simulation of the Intracluster Medium