using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter01 { /// /// Example01: How many atoms in the cube? /// A solid cube of aluminum has a volume of 0.2 cm^3. /// It is known that 27 g of aluminum contains 6.02\times 10^23 /// atoms. How many aluminum atoms are contained in the cube? /// Answer:1.20525243449336E+22 /// public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { L.Atom al = new L.Atom(); al.AtomNumber = 13; al.Find(); L.Volume v = new L.Volume(); v.Magnitude = 0.2; // cgs v.mCUBE = L.Unit.cgsTOmks(v); L.Density rho = new L.Density(); rho.Magnitude = 2.7; // cgs rho.kgPERmCUBE = L.Unit.cgsTOmks(rho); L.Mass m = new L.Mass(rho,v); result += m.ToString()+"\r\n"; double res = L.Unit.mksTOcgs(m)/al.AtomicMass*L.Constant.AvogadroConstant; result += res.ToString(); } } } /* 0.00054 +/- 0 (kg) 1.20482374245503E+22 */