Programming in Visual Studio C++ 2010

The comfort zone temperature for the occupants of a building is higher in summer months than it is in winter months. It is also dependent on the value of the relative humidity. Write a program that reads in values for temperature and humidity as well as whether it is summer or winter. Use these values to determine if those conditions fall within the comfort zone or not. For our purposes, the comfort zone is defined by the values in the following table.

Temperature/Humidity Comfort Range

Season

Relative Humidity

Temperature

(°F)

Summer

30% to 60%

74° to 82°

Winter

30% to 60%

68° to 78°

The program you write should:

Repeatedly accept as the initial input the temperature in Celsius.
Recognize a negative temperature value as a sentinel or stop value.
Convert the Celsius temperature to Fahrenheit.
Accept as input the relative humidity.
Accept as input whether it is summer or winter.
Determine whether the conditions are in the comfort zone.
Display output using the following format:
Echo back the converted temperature and the relative humidity using a line formatted this:

The temperature in Fahrenheit is __. The relative humidity is __%.

(Where the converted temperature value and the humidity value are displayed in place of the underline symbols.)

If the conditions are in the comfort zone, display a line formatted like this:

These conditions are in the comfort zone for {summer | winter}.

Where either the word summer or the word winter is displayed.

If the conditions are not in the comfort zone, display a line formatted like this:

These conditions are not in the comfort zone for {summer | winter}.

Where either the word summer or the word winter is displayed.

If the conditions are not in the comfort zone, display a line for each of the conditions that fall outside of the acceptable range for that parameter:

The temperature is too {high | low}.

The humidity is too {high | low}.

Where either the word high or the word low is displayed.

After displaying the results for one set of values, your program should prompt the User for another set of values and determine if that set of values (temperature and humidity) are in the comfort zone. You program should continue prompting the User for values until the User enters a negative value for the Celsius temperature.

(NOTES: The acceptable range of values for the relative humidity is from zero (0) to 100 inclusive. Write your program so that an input temperature value of 25.5 will be converted and processed correctly.)

Use Qt instead VS: http://qt-project.org/downloads

P.S. I prefer MinGW version
we will not do your homework for you
Use Qt instead VS

what nonsense is this? He doesnt have to write a UI from the description.
Last edited on
But he can if he want
Last edited on
mutexe lol +1
Topic archived. No new replies allowed.