Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please can you use if if else while And can you use C++ programing language Question: The pressure of a gas changes as the volume

image text in transcribed
image text in transcribed
image text in transcribed
Please can you use if if else while And can you use C++ programing language Question: The pressure of a gas changes as the volume and temperature of the gas vary, Write a program that uses the Van der Waals equation of state for gas. PV-NORT You need to display in tabular form the relationship between the pressure and the volume of n moles gas at a constant temperature (T), P is the pressure and V is the volume. Use 8.3145 for gas constant R. Your program will output a table that varies the volume of the gas from the initial to the final volume in steps prescribed by the volume increment Your program should ask the user to continue or stop. To continue user must enter *y*, to stop 'n letter. If the user enters different letter from "y' or ' the program should continue to ask again as in sample run. Assume that user can enter one letter Attention: **You have to solve the problem using what we have covered in the class so far. For example, you CAN NOT USE any standard library functions or operations such as strings in the solution which we did not teach you! **The output format must be the same format as the sample runs below! Here is some sample run Sample Run 1: Enter the name of gas: H Here Users to enter some specification of the gas Quantity of H (moles): 1.2 Temperature (kelvin): 356 Initial volum (milliliters)400 Final volume (milliliters): 600 Volume increment (milliliters): 50 1.200 moles of Hat 356 kelvin 1 Here program starts the out the sus Volume (ml) Pressure (atm) 400 450 500 550 600 8.8799 7.8932 7.1039 6.4581 5.9199 * Here program asks the user o continue or not "The ser endered to the program is terminated with by Do you want to continue fynxn Bye. Sample Run 2: Enter the name of gas: N Quantity of N (moles) 0.2 Temperature (kelvin): 300 Initial volume (milliliters): 245 Final volume (milliliters): 300 Volume increment (milliliters): 17 0.200 moles of Nat 300 kelvin Volume (ml) Presente (atm) 245 262 279 2.0362 1.9041 1.7881 1.6854 Herreny ned. The programs as where Do you want to continue Lync You entered wrong character Do you want to continue lyn You entered wrong character Do you want to continue Lynn Bye Sample Run 3: Enter the name of gas: 0 Quantity of moles: 2.3 Temperature (kelvin): 100 Initial volume (milliliters): 200 Final volume (milliliters: 300 Volume increment (milliliters) 50 2.300 moles of at 100 kelvin Volume (ml) Pressure (atm) 9.5617 250 63744 The program should ask the specification of the Atter some competing in display is valon Do you want to contine lyny Enter the name of gas: F Quantity of F (moles): 34 Temperature (kelvin): 245 Initial volume milliliters): 300 Final volume (milliliters): 500 Volume increment (milliliter 15 3.400 moles of Fat 245 kelvin Volume (ml) Prosure (atm) 300 23.0866 315 21.9872 20.9878 345 20.0753 300 19.2388 375 18.4693 17.7589 405 17.1012 420 16.4904 435 15.9218 450 15.3911 465 14.8946 480 14.4291 495 13.9919 390 Do you want to continent Bye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

What is the big idea?

Answered: 1 week ago