blob: 6e4c3266e9f3ea2d5719866e5e0ecdf248b6c911 (
plain)
1
2
3
4
5
6
7
8
9
|
//example 4
//Calculating atmospheric pressure
clear
clc
dm=13534 //density of mercury in kg/m^3
H=0.750 //height difference between two columns in metres
g=9.80665 //acc. due to gravity in m/s^2
Patm=dm*H*g/1000 //atmospheric pressure in kPa
printf("\n hence, atmospheric pressure is Patm = %.2f kPa. \n",Patm)
|