blob: 9df8441e9ba0c0fc70f3de1e911a609679c2a481 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//Variable declaration
e=1.6*10**-19;
m=9.1*10**-31; //mass(kg)
h=6.63*10**-34; //planck's constant
V=344; //potemtial(V)
n=1;
theta=60; //angle(degrees)
//Calculation
theta=theta*%pi/180; //angle(radian)
d=n*h/(2*sin(theta)*sqrt(2*m*V*e)); //interplanar spacing(m)
//Result
printf('interplanar spacing is %0.3f angstrom \n',(d*10**10))
|