summaryrefslogtreecommitdiff
path: root/172/CH17/EX17.5/ex5.sce
blob: d655a00f72d00236f0600c20daf3f73e301df179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//ques5
//determining velocity of sound in air
clear
clc
k=1.4;//constant
R=0.287;//gas constant
//at 300K
T1=300;//K
c1=sqrt(k*R*T1*1000);
printf('Speed of sound at %.0f K = %.1f m/s \n',T1,c1);
T2=1000;//K
c2=sqrt(k*R*T2*1000);
printf(' Speed of sound at %.0f K = %.1f m/s \n',T2,c2);