i am trying to make a program which calculates the geometrical average.But i get this error mesage: lvalue required as left operand of assignment
#include
It is rather a mathematical problem than a programming problem. If you know that
average*average = number1*number1+number2*number2
you must evaluate average first. Solution is
average = sqrt(number1*number1+number2*number2)
EDIT1: but geometric mean should be computed as
average = sqrt(number1 * number2)
according to http://en.wikipedia.org/wiki/Geometric_mean