blob: 5d644b74102197e5fb94dad279cc10b797116395 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
//Variable declaration
n=2; //number of atoms
M=55.85; //atomic weight(kg)
rho=7860; //density(kg/m**3)
Na=6.02*10**26; //avagadro number
//Calculation
a3=n*M/(rho*Na);
a=a3**(1/3); //lattice constant(m)
//Result
printf('lattice constant is %0.3f angstrom \n',(a*10**10))
|