Question

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

2. 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.

c language

Homework Answers

Answer #1

#include <stdio.h>

int main()
{
double o=32,r=0.0821,v,p,t,n,m;
printf("Enter the pressure of container: ");
scanf("%lf",&p); //Taking pressure from user
printf("Enter the volume of container: ");
scanf("%lf",&v); //Taking volume from user
printf("Enter the temperature of the container: ");
scanf("%lf",&t); //Taking temperature from user
t = t + 273;
m = (p*v)*o/(r*t); //Calculating the mass
printf("The mass of oxygen gas in the conatiner is: %lf",m); //Printing the ans
  

return 0;
}
Output:-

Know the answer?
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
Similar Questions
Problem 5 A A storage tank at STP contains 28.5 kg of Oxygen (O2). Oxygen (O)...
Problem 5 A A storage tank at STP contains 28.5 kg of Oxygen (O2). Oxygen (O) has an atomic weight of 16 grams/mol. What is the volume of the tank? Give your answer in meters cubed and to two decimal places. Do not type the units in the box, just the numerical value. Problem 5B A storage tank at STP contains 28.5 kg of Oxygen (O2). Oxygen (O) has an atomic weight of 16 grams/mol. You add 3 kg of...
A) A syringe containing 1.25 mL of oxygen gas is cooled from 90.3 ∘C to 0.9...
A) A syringe containing 1.25 mL of oxygen gas is cooled from 90.3 ∘C to 0.9 ∘C. What is the final volume Vf of oxygen gas? B) What is its volume after an additional 0.30 mol of gas is added to the cylinder? (Assume constant temperature and pressure.) Express your answer to three significant figures. C) What is the pressure in a 12.9 L cylinder filled with 0.425 mol of nitrogen gas at a temperature of 300 K ? D)...
Can someone let me know f my calculations are correct. Thanks! You have 22.4 L of...
Can someone let me know f my calculations are correct. Thanks! You have 22.4 L of an unknown noble gas at standard temperature and pressure with a density of 5.861 g/L a.   How many moles of this gas are in the container? i.   n= PV/RT= R=0.082057 L.atm/K.mol T=273.15 K Volume= 22.4 L Density=5.861 g/l P=1 atm so: n=(1atm*22.4L)/ (0.082057 L.atm/K.mol* 273.15 K)= n=(22.4)/(0.082057 mol*273.15) n=22.4/22.1= 1 mole b.  What is the molar mass of this gas? i.   M=dRT/P M=(5.861g/L*0.082057 L.atm/ K.mol*273.15...
1.) Imagine that you have a 7.00 L gas tank and a 4.00 L gas tank....
1.) Imagine that you have a 7.00 L gas tank and a 4.00 L gas tank. You need to fill one tank with oxygen and the other with acetylene to use in conjunction with your welding torch. If you fill the larger tank with oxygen to a pressure of 155 atm , to what pressure should you fill the acetylene tank to ensure that you run out of each gas at the same time? Assume ideal behavior for all gases....
Hydrazine, N2H4, once used as a rocket propellant, reacts with oxygen in the following equation. N2H4(g)...
Hydrazine, N2H4, once used as a rocket propellant, reacts with oxygen in the following equation. N2H4(g) +O 2(g) →N2(g) + 2 H2O(g) The reaction, at 50% yield, produces 4.0 moles of N2. What was the mass of hydrazine used? Assume that O2 is in excess. A) 64 g B) 0.063 g C) 260 g D) 32.0 g 42) 43) Which of the following is the lowest temperature? A) 313 K B) 37°C C) 54°F D) All of these temperatures are...
Chemical Reactions Types and Their Equations Making Heat with Chemical Reactions Have you ever wondered how...
Chemical Reactions Types and Their Equations Making Heat with Chemical Reactions Have you ever wondered how an instant heat pack works? A disposable heat pack works by a chemical reaction that combines iron in the package with oxygen from the air when the outer packaging is removed producing iron oxide. You have probably seen the product of this reaction in what is commonly called rust. The reaction releases heat, which allows the pack to reach a sufficient temperature that is...