The aim of this work is to investigate the heat transfer inside a ventilated room with supply and exhaust slots, under a steady and turbulent flow regime. Firstly, for assimilating the heating floor, the floor is kept at a temperature T-H and the other walls are fixed at a temperature T-C (T-C < T-H). In the case of cooling ceiling, the top of room is maintained at T-C and the other walls are fixed at a temperature To. Four configurations are considered here, according to the position of the inlet and outlet air openings on the vertical walls. The cavity is provided with two slots: an inlet slot for introducing hot or fresh air, and an outlet slot to extract air. Physical processes are modeled using the FLUENT computational fluid dynamics software. The results showed that our physical model were therefore validated to analyze indoor environment. The main aim sought here is to analyze the ventilation efficiency for temperature distribution, and search the best configuration providing the thermal comfort targeted. We also address the influence of heating or cooling on the behavior of flow and thermal comfort, while considering different Rayleigh number. As parameters of thermal comfort conditions, indoor temperatures with its gradients, and the mean temperature are analyzed. The simulations carried out showed the justification of the best ventilation configuration for the winter period and for the summer period using respectively a heating floor and a cooling ceiling.