127. a的b次方

 avatar
user_6817964
c_cpp
2 years ago
363 B
1
Indexable
Never
#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;

}