blob: 985f7a982a4a4ce2bbfa8a779a64648f8e59356e (
plain)
1
2
3
4
5
6
7
8
9
10
|
clear
// Variable Declaration
R=287// The specific gas constant in J/(kg K)
m=5 // The mass of ideal gas in kg
p=101.325// The atmospheric pressure in kPa
T=273+25// The temperature of an ideal gas in K
// Calculation
V=(m*R*T)/(p*1000)// The volume of an ideal gas in m**3
printf("\n The volume of an ideal gas is %0.2f m**3",V)
|