第二章例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\n",i,power);
    }

    return 0;

}

posted @ 2013-10-01 16:17  刘睿1994  阅读(106)  评论(0编辑  收藏  举报