summaryrefslogtreecommitdiff
path: root/3669/CH3/EX3.8/8.sce
blob: 330997620f0fbb4ee92a01db6aec87c3a7a10bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
//Variable declaration
theta=90;    //angle(degrees)
lamda=1.5;    //wavelength(angstrom)
d=1.6;    //spacing(angstrom)

//Calculation
theta=theta*%pi/180;    //angle(radian)
n=2*d*sin(theta)/lamda;    //order of diffraction

//Result
printf('order of diffraction is %0.3f     \n',int(n))