作业2-习题2.3

#include<stdio.h>
int main(void)
{
    int n,i;
    double x,y;
    y=1;
    printf("输入n,x:");
    scanf("%d%Lf",&n,&x);
    for(i=1;i<=n;i++){
        y=y*x;
    }
    printf("y=%Lf",y);
    return 0;
}

原文地址:https://www.cnblogs.com/simple9495/p/3378637.html