//Example 11.1 A=50*(10^3)^2;//Surface area (m^2) h=40;//Average depth (m) rho=1*10^3;//Density of water (kg/m^3), See Table 11.1 V=A*h;//Volume (m^3) m=rho*V;//Mass of water (kg) printf('Mass of water behind the dam = %0.2e kg',m) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest