if the arithmetic mean of p and q is 10 and the arithmetic mean of q and r is 20 , what is the value of r - p ?
arithmetic mean expression for p and q : ( p + q ) / 2 = 10 ; p + q = 20 - - - - eq 1 arithmetic mean expression for q and r : ( q + r ) / 2 = 20 ; q + r = 40 - - - - eq 2 subtracting eq 1 from eq 2 we get : r - p = 20 hence , the correct answer is a
subtract(multiply(20, const_2), multiply(10, const_2))