When ice is changing to water, its temperature remains the same because the heart gained…