double power(double base, int exponent) return with int type. when ./Demo 2.4 2 result is 4 need to change the return type to double.