summaryrefslogtreecommitdiff
path: root/494/CH8/EX8.3/8_3.sce
blob: e914df91005bd13b3eef5da66f77a9156e74ccde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//All the quantities are expressed in SI units

gam = 1.4;                    //ratio of specific heats

//(a)
M = 2;                        //Mach number

//the ratio of kinetic energy to internal energy is given by
ratio = gam*(gam-1)*M*M/2;

printf("\n(a)\nThe ratio of kinetic energy to internal energy is:\n\n                        %1.2f\n",ratio)

//similarly for (b)
//(b)
M = 20;

ratio = gam*(gam-1)*M*M/2;

printf("\n(b)\nThe ratio of kinetic energy to internal energy is:\n\n                        %3.0f\n",ratio)