第二章例2-10

/* 调用幂函数pow()生成乘法表 */
#include<stdio.h>

#include<math.h>
int main(void)


{
    int i,n;
    double power;

    printf("Enter n:");
    scanf_s("%d",&n);
    for(i=0;i<=n;i++){
        power=powl (2,i);

        printf("pow(2,%d)=%.0f
",i,power);
    }

    return 0;

}

原文地址:https://www.cnblogs.com/laurenliu1994/p/3348592.html