Question: What do i put in the your code goes here part to get the correct code for this problem 2.24 LAB: Chemistry formula People commonly

What do i put in the your code goes here part to get the correct code for this problem
 What do i put in the your code goes here part
to get the correct code for this problem 2.24 LAB: Chemistry formula
People commonly wite simple programs (even if not a CS major) to

2.24 LAB: Chemistry formula People commonly wite simple programs (even if not a CS major) to do a complex calculation. Below is the van der Waals equation for a real gas, relating Pressure, Volume, Temperature, for n moles of a gas: (P+aV2n2)(Vnb)=nRT The ferm in the left parentheses is known as the "ideal gas pressure", and in the right parentheses as the "ideal gas volume': R is known as the ideal gas constant and equals 8.314. (See hitas i/ler wikipedia org/wikiNanderWaals_equation for more info) Write a program that takes P. V, and n as inputs, and outputs T, for carbon dioxide for which a =3.59 and b=0.0427. You'l of course first need to rewrite the equation to solve for T, using simple algebra; dont try to simplify the equation though All variables should be foat. (Dorit try to convert units. Assume inputs are positive) If the input is. 100101 the output is 119,808 TAs may examine your code closely for style (and some course points are for style). Make sure your code uses good varlable names, following the class' style. It's a good idea to avoid writing the entire formula as one big equation. Use comments to explain things as appropriate. There are many ways to whte even this simple program, so we would expect your program will be somewhat different from folks you might be getting help from or helping Hint: Try using temporary variables to hold a partial calculation. TAs may examine your code closely for style (and some course points are for style). Make sure your code uses good variable names, following the class' style. It's a good idea to avoid writing the entire formula as one big equation. Use comments to explain things as appropriate. There are many ways to write even this simple program, so we would expect your program will be somewhat different fro folks you might be getting help from or helping. Hint: Try using temporary variables to hold a partial calculation. \begin{tabular}{l|l} uAB \\ ACriviry & 2.24.1: LAB: Chemistry formula \end{tabular} 0/10 main.cpp Load default template 1 \#include ciostreamo 2 using namespace std; int mainO 1. Type your code here. Note: Include the math library above first." 8 return i 3 When done developing your program, press the Submit for grading button below, This will submit your program for auta-grading Output differs. See highlights below. Input Your output Expected output 2.Compare output Output differs. See highlights below. Input Your output Expected output

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!