blob: 565eb581524d91f193c25bb0221cc97ade5aa04c (
plain)
1
2
3
4
5
6
7
8
9
10
|
//example 8
//calculating mass of air
clear
clc
P=100 //pressure in kPa
V=6*10*4 //volume of room in m^3
R=0.287 //in kN-m/kg-K
T=25 //temperature in Celsius
m=P*V/(R*(T+273.2)) //mass of air contained in room
printf("\n hence, mass of air contained in room is m = %.3f kg. \n",m)
|