clc //initialisation of variables d= 1.287 //g cm^-3 a= 123 //A z= 4 //CALCULATIONS M= d*6.023*10^23*a^3*10^-24/z //RESULTS printf (' molecular weight = %.1e gm ',M)