summaryrefslogtreecommitdiff
path: root/623/CH1/EX1.1.24/U1_C1_24.sce
blob: 43fc914ad996f0e870a4416ec21dfd05880a617d (plain)
1
2
3
4
5
6
7
8
9
//variable initialization
n=0.01                            //fractional increase in momentum
c=3*10^8;                         //speed of light (meter/second)

//calculation of velocity of particle
Beta=(n*(2-n))^(1/2);             //calculation of Beta
v=Beta*c;                         //velocity of particle (meter/second)

printf("\nBeta = %.1e\nThe velocity of the particle = %.2e meter/second",Beta,v);