blob: 48a6940d6bfe98a6165f0f7ddc94077b9d2717d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//Variable declaration
n=1; //order of diffraction
theta=38.2; //angle(degrees)
lamda=1.54; //wavelength(angstrom)
h=2;
k=2;
l=0;
//Calculation
theta=theta*%pi/180; //angle(radian)
d=n*lamda/(2*sin(theta));
a=d*sqrt(h**2+k**2+l**2); //lattice parameter of nickel(angstrom)
//Result
printf('lattice parameter of nickel is %0.3f angstrom \n',(a))
|