Question: Using simple if/else statement and switch statement C++ programming. ( Im not quite sure how to type the calculation in this program) Thank you. Down

Using simple if/else statement and switch statement C++ programming. ( Im not quite sure how to type the calculation in this program) Thank you.
 Using simple if/else statement and switch statement C++ programming. ( Im
Down below is my c++ program so far :
#include
using namespace std;
double x, y, z, a, b, windchillcalculation, heatindexcalculation;
int main()
{
int choice;
cout
cout
cout
cin>>choice;
if(choice==1)
{
cout
cin>>z;
cout
cout
cin>>x;
cout
cout
cin>>y;
cout
windchillcalculation=()
}
if(choice==2)
{
cout
cin>>a;
cout
cout
cin>>b;
cout
}
}

The temperature perceived by the human body is a function of ambient air temperature and other factors, including wind speed, humidity, and solar radiation. Perceived temperature can be modeled using simplified formulas as either heat index or wind chill. Create a program to calculate either the heat index or the wind chill, based on the user's choice. Ask the user to make a selection: 1. wind chill (up to 20 degrees Celsius) heat index (20 degrees Celsius and above) 2. For wind chill, prompt the user for: temperature in degrees Celsius wind speed in m/s (at 10m elevation) relative humidity (%) . Formula for wind chill (apparent temperature): AT Ta +0.33xe -0.70xws-4.00 where Ta dry bulb air temperature in degrees Celsius ws wind speed at 10m of elevation e = water vapor pressure, according to the following formula: e- rh/100x 6.105x exp (17.27 x Ta/(237.7+ Ta)) where rhs relative humidity (%) For heat index, prompt the user for: temperature in degrees Celsius relative humidity (%) . Calculate heat index (WBGT) using this formula: WBGT-(0.567 x Ta)+ (0.393 x e)+3.94 where Ta - dry bulb air temperature in degrees Celsius e water vapor pressure, according to the following formula: e (rh/100) x6.105 x exp (17.27 x Ta/(237.7 +Ta )) Celsius to the nearest whole degree. Be sure to use the Report the result in degrees appropriate data types for the variables and constants in your program. Take care to compose user interface that will give the user a comfortable experience

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!