blob: 59eaf1d9a5669721157b8cbf1a185c4c7c2ad611 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//Initialisation of variables
clc
e=1.603e-20//electron volts
t=6.6e-9
m=9.11e-28//mass of electron
V=500e8//e.m.u
d=5//cm
X=V/d//e.m.u per cm
f=X*e//force on electron
a=f/m//acceleration of electron
v=a*t//velocity of electron
dist=.5*a*t^2//distance travelled
printf('velocity of electron is %e cm per s \n',v)
printf('distance travelled is %d cms \n',dist)
|