Question

Write a program to determine the mass of oxygen gas (formula: O2, molecular weight = 32...

Write a program to determine the mass of oxygen gas (formula: O2, molecular weight = 32 grams per mole) in units of grams in a container. You may assume that the user will provide the volume of the container in units of gallons, the temperature in the container in degrees Celsius, and the pressure in the container in units of atmospheres. For your test case, you may assume that the user provides 1.25 gallons for the volume of the container, 125 degrees Celsius for the temperature, and 2.5 atmospheres for the pressure in the container.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

#include <iostream>

using namespace std;

int main()
{
double P,v,m,M=32.0,T;
cout<<"Enter P: ";
cin>>P;
cout<<"Enter v: ";
cin>>v;
cout<<"Enter T: ";
cin>>T;
T=T+273;
double R=0.08206;
m=(P*v)*M/(R*T);
cout<<"mass is grams is "<<m<<endl;
  

return 0;
}

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Write a program to determine the mass of oxygen gas (formula: O2, molecular weight = 32...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT