//calculating hardness //Example 1.1 clc clear //100gm of CaCO3 = 136gm of CaSO4 m=204//mass of the substance wt=136//molecular mass Eq=(m*100)/wt//Equivalents of CaCO3 printf('Thus Equivalents of CaCO3 = %3.2f mg/L or ppm',Eq)