clear clc // CHEMISTRY FOR ENVIRONMENTAL AND ENGINEERING SCIENCE FIFTH EDITION disp(' Chapter 2: Basic Concepts from General Chemistry') disp('example 2.1a') // To calculate the equivalent weight disp("What is the equivalent weight of a calcium ion") // Let the equivalent weight be denoted by EW, formula waight be denoted by FW, and Z be denoted by the absolute value of ion charge disp("Z=2 for calcium ion") disp("The formula weight of calcium ion is 40 g/mol") FW=40 Z=2 EW=FW/Z printf("The equivalent weight of calcium ion is %.f g per equivalent",EW); //end