//example-5.1 //page no-136 //given //wavelength of X-rays beams of light lambda=0.824*10^-10 //m //glancing angle of the incident light theta1=(8+35/60)*(%pi)/180 //radians n1=1 //to find theta3 i.e at n3=3 //as we know that //2*d*sin(theta)=n*lambda //so for n1 and n3 we get in the same way and solving together we get theta3=asin(3*sin(theta1)) //so d=lambda/2/sin(theta1) printf ("the galncing angle for thethird order diffraction is and interplanar spacing of the crystal is 2.761 A")