Question: Using C++, could you turn this code into a loop? cout < < Please enter the temperature for each day of the week < <

Using C++,

could you turn this code into a loop?

cout << "Please enter the temperature for each day of the week" << " Celsius temperature for " << DAYNAME[0] << ": "; // Get the input using our function sundayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[1] << ": "; // Get the input using our function mondayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[2] << ": "; // Get the input using our function tuesdayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[3] << ": "; // Get the input using our function wednesdayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[4] << ": "; // Get the input using our function thursdayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[5] << ": "; // Get the input using our function fridayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

cout << "Celsius temperature for " << DAYNAME[6] << ": "; // Get the input using our function saturdayCelsius = GetValidDouble(MIN_INPUT, MAX_INPUT);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!