My first program in C. A simple command-line calculator
power() problems
double power() does not return a value.
Incorrect result when y is not a value in the int range.
Code attempts a linear power calculation: O(y).  Research Exponentiation by squaring.  It is faster and less precision loss.
double r parameter serves no purpose. Instead make a local double r variable.
A floating point power function is one of the most changeling functions to code well.  Rough cut below.

root() problems
double root() does not return a value.
Other problems like power().

It floating point, not fixed point
More informative to use exponential notation for large and small value than a fix-point format.
// printf(&quot;%0.1lf&quot;, res);
printf(&quot;%g&quot;, res);


Sample improved my_power() - unchecked
// Very rough code
double my_power(double x, double y) {
  double whole;
  double fraction = modf(y, &amp;whole);
  if (fraction == 0.0) {
    double r = 1.0;
    double p = fabs(whole);
    while (p &gt; 0) {
      if (fmod(p, 2.0)) {
        r *= x;
      }
      x *= x;
      p /= 2.0;
    }
    if (whole &lt; 0) {
      r = 1.0 / r;
    }
    return r;
  }
  if (x == 0.0) {
    return 0.0;
  }
  if (x &lt; 0.0) {
    return NAN;
  }
  return exp(log(x) * y);
}