summaryrefslogtreecommitdiff
path: root/3755/CH2/EX2.18/Ex2_18.sce
blob: 0bfb4030ba2a28b5de2584288a20dcd63899fbe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clear
//
//
//

//Variable declaration    
a=0.356*10^-9;       //cube edge(m)
M=12.01;         //atomic weight
N=6.023*10^26;      //avagadro number

//Calculations
n=8/a^3;     //number of atoms
m=M/N;        //mass(kg)
rho=m*n;      //density of diamond(kg/m^3)

//Result"
printf("\n number of atoms is %0.2f *10^29",n/10^29)
printf("\n density of diamond is %0.1f kg/m^3",rho)
printf("\n answer in the book is wrong")