blob: 8ba6a90e3c47079076ed2c8bf1d45c9286eae254 (
plain)
1
2
3
4
5
6
7
|
clc
//to calculate speed
c=3*10^8 //light speed (m/s)
m=2.25 //mass m of a body be 2.25 times its rest mass mo i.e. m=2.25m0
//formula is v=c sqrt(1-(m0/m)^2)
v=c*sqrt(1-(1/m)^2)
disp(" speed is v="+string(v)+"m/s")
|