Question: Make sure to make ONE flowchart and ONE appendix for each algorithm. This is done in a c++ program. #include #include #include using namespace std;

Make sure to make ONE flowchart and ONE appendix for each algorithm. This is done in a c++ program.

#include

#include

#include

using namespace std;

int tc(int x);

double tk(int x);

double psat(int y);

double p(int x, double y);

double d(double x, double y);

int main() {

cout << "Height" << setw(10) << "Temp" << setw(18) << "Pressure" << setw(13) << "Density" << setw(10) << "Psat" << endl;

cout << "------" << setw(10) << "----" << setw(18) << "--------" << setw(13) << "-------" << setw(10) << "----" << endl;

cout.precision(2);

for (int h = 17; h <= 23; h++) {

int tca = tc(h);

double tka = tk(tca);

double pa = p(h, tka);

double da = d(tka, pa);

double pasta = psat(tca);

cout << h << setw(14) << fixed << tca << setw(16) << pa << setw(16) << scientific << da << setw(12) << pasta << endl;

}

}

int tc(int x) {

return 3 * (x - 15) - 131;

}

double tk(int x) {

return 273.15 + x;

}

double psat(int y) {

return 6.1 * pow(10, (7.5 * y) / (237.3 + y));

}

double p(int x, double y) {

return 101.33 * exp(((-34.58 * x) / y));

}

double d(double x, double y) {

return y / (281 * x);

}

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!