Display a table of pressure and volume of n moles of carbon dioxide according to Van der Waal's equation of state for a given temperature and equation of state for a given temperature and initial
What will be an ideal response?
```
int main()
{
const double a = 3.592; // Van der Waal's const L^2 atm / mol^2
const double b = 0.0427; // Van der Waal's const L / mol
const double R = 0.08206; // gas constant L atm / mol K
double n; // number of moles of gas
int T, // kelvin temperature of gas
Vi, // initial volume of gas in milliliters
Vf, // final volume of gas in milliliters
Vinc; // increment volume for table
cout << endl << "Please enter at the prompts the number of moles of carbon"
<< endl << "dioxide, the absolute temperature, the initial volume in"
<< endl << "milliliters, the final volume, and the increment volume"
<< endl << "between lines of the table." << endl << endl;
cout << "Quantity of carbon dioxide (moles)=> ";
cin << n;
cout << "Temperature (kelvin)=> ";
cin << T;
cout << "Initial volume (milliliters)=> ";
cin << Vi;
cout << "Final volume (milliliters)=> ";
cin << Vf;
cout << "Volume increment (milliliters)=> ";
cin << Vinc;
cout << endl << n << " moles of carbon dioxide at " << T << "
kelvin"
<< endl << endl;
cout << "Volume (ml) Pressure (atm)" << endl;
for (int V = Vi; V <= Vf; V += Vinc) {
double VL = V / 1000.0; // Convert to Liters for calculation
double P = (n * R * T) / (VL - b * n) - (a * n * n / (VL * VL));
cout << setw(6) << V << " " << setw(9) << P << endl;
}
cout << endl;
return 0;
}
```
You might also like to view...
Recursion is often less efficient than iteration because ________.
a. it can cause an explosion of method calls. b. it is not as intuitive. c. recursive methods are harder to debug. d. recursive methods take longer to program.
You should never use images alone to convey information on your Web pages.
Answer the following statement true (T) or false (F)
While Sara is logging into the server from her workstation, she notices Pete watching her enter the username and password. Which of the following social engineering attacks is Pete executing?
A. Impersonation B. Tailgating C. Piggybacking D. Shoulder surfing
COGNITIVE ASSESSMENT Which of the following statements is not true about solid state media?
A. Flash memory chips are a type of solid state media. B. They consist entirely of electronic components, such as integrated circuits. C. They contain moving parts. D. They are more durable and shock resistant than other types of media.