127. a的b次方

 avatar
user_6817964
c_cpp
2 years ago
363 B
4
Indexable
#include <stdio.h>
#include <math.h>

void power(double* x, double* y, double* res);

void power(double* x, double* y, double* res) {
    *res = pow(*x, *y);
}


int main() {

    double a;
    double b;
    double res;

    scanf("%lf %lf", &a, &b);

    power(&a, &b, &res);
    printf("%.1lf^%.1lf=%.1lf\n", a, b, res);

    return 0;

}
Editor is loading...