blob: f2d73a16a4e9ddd33b9c74a2c718dfab8ed756c4 (
plain)
1
2
3
4
5
6
7
8
9
10
|
clc
//Given that
ratio = 0.5 // Ratio of lengths of spaceship
c = 3e8 // speed of light in m/s
// sample problem 8a page No. 224
printf("\n \n\n # Problem 8a # \n")
printf("\n Standard formula used \n l = l_o* sqrt ( 1- (v/c)^2)")
v = c * sqrt(1 - ratio^2) // calculation of Speed of spaceship
printf ("\n Speed of spaceship is %e m/s.",v)
|